cdglabs / apparatus

A hybrid graphics editor and programming environment for creating interactive diagrams.

Home Page:http://aprt.us/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Self referential parameters cause a crash in the editor

opened this issue · comments

Eg: Setting a circle's X position to be that same circle's X position. This locks up the whole editor forcing me to refresh the page.

This probably either:

  • Shouldn't be allowed, or
  • Should have recursion limited

Yes, and I think if there is a circular reference then it should just evaluate to an error saying so. Notice this wouldn't affect "recursive shapes" which reference attributes from their parent frame (e.g. the Parabola example in the doc/examples directory).

This is the file to change,
https://github.com/cdglabs/apparatus/blob/master/src/Model/Attribute.coffee

Unfortunately it is currently one of the messiest files in the codebase. 😭