Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloning _customState: clones don't inherit correct pen state #557

Closed
cwillisf opened this issue May 8, 2017 · 0 comments
Closed

Cloning _customState: clones don't inherit correct pen state #557

cwillisf opened this issue May 8, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@cwillisf
Copy link
Contributor

cwillisf commented May 8, 2017

Expected Behavior

When a rendered target is cloned, the new clone should inherit the pen state of the original. That includes:

  • the size and color of the pen,
  • whether the pen is down or not,
  • and the events which implement drawing on move.

We should implement this in such a way that the cloning code doesn't have to "know about" pen implementation details. Ideally we should allow a block package to decide how to clone its custom state to a new target.

Actual Behavior

As of #555 we are now cloning the contents of a rendered target's _customState when that target is cloned. This means we're cloning the size and color of the pen, as well as the flag indicating whether or not the pen is down, but we're not cloning the events. This means that pen projects involving clones often behave incorrectly.

There may also be audio-related consequences, since the audio effects use _customState as well.

Steps to Reproduce

image

See Also

Previous issues: #481, #493
Previous discussion: #525
Current partial solution: #555

@cwillisf cwillisf added the bug label May 8, 2017
@cwillisf cwillisf self-assigned this May 8, 2017
@thisandagain thisandagain added this to the June 21 milestone May 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants