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

Changing costume to one with zero width or height doesn't update correctly #571

Closed
cwillisf opened this issue Mar 19, 2020 · 1 comment
Closed

Comments

@cwillisf
Copy link
Contributor

Expected Behavior

When the user clicks a costume in the paint editor, the sprite's bounds should always be updated to match the costume.

Actual Behavior

When the user clicks a costume in the paint editor, the sprite's bounds are updated to match the costume ONLY if the new costume's width and height are both non-zero.

Steps to Reproduce

  1. Create or edit a project which uses the pen extension
  2. Make a sprite with at least two costumes:
  3. Move the rotation center outside the costume for the "normal" costume
  4. Activate the "normal" costume and use pen down and go to random position to see fencing behavior
  5. While the project is running, switch to the other costume.

Expected: the sprite (Drawable) is fenced according to the new 1x1 ImageData
Actual: the sprite (Drawable) is fenced according to the previous "good" costume

The problem goes away after using the paint editor to adjust the rotation center of the zero-width / zero-height costume.

Example (thanks @fsih!)

@adroitwhiz
Copy link
Contributor

I think this was fixed by scratchfoundation/scratch-vm#2314.

@fsih fsih closed this as completed May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants