Wicklets/wick-editor

[BUG] User should not be able to add drawings, or elements, to tweened frames.

Opened this issue · 3 comments

Describe the bug
When adding drawings or elements to a tweened frame, undefined behavior can occur since tweened frames expect the entire frame's context to be a Clip.

To Reproduce
Steps to reproduce the behavior:

  1. Create a drawing on the canvas.
  2. Extend the frame to any length over 1.
  3. Create a tween and tween the elements of that frame (tweening position is the most visual).
  4. Attempt to draw on that frame.
  5. Play the project.
  6. See error.

Expected behavior
Drawing should be disallowed on tweened frames.

Attempt #1, simply disallowing adding children to tweened frames, did not work as applyChanges / applyDrawableChanges removes and re-adds ever object on every canvas modified...

Need to be able to add objects without removing literally everything off of the canvas.

Looks like we'll need to check if an object exists on the frame, and update the objects if a change is made rather than remove and re-add the objects.

Related: #337