cdglabs/apparatus

Self referential parameters cause a crash in the editor

Opened this issue · 1 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. 😭