Skip to content

Add "layerchange" event to Sprite, continuous event #5165

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

Open
wants to merge 1 commit into
base: beta
Choose a base branch
from

Conversation

ckaiser
Copy link
Member

@ckaiser ckaiser commented May 13, 2025

Implements #5164, first draft. Could use some feedback on the API, tried to keep it as simple (and consistent) as possible, so I added a DocObserver event for the continuous mode.

Adds a 'layerchange' event to Sprite with a given event.type that can be one of visibility, added, removed, editable, blendmode, collapsed, mergeddown, opacity, restacked, continuous.

Some of my doubts:

  • Right now changing the layer visibility for all layers by clicking the header sends an event for each layer, but doing this for editable or continuous doesn't, should I go ahead and change the timeline/event code for that, or would that have any unintended consequences?
  • As commented in the code, right now we only onBeforeLayerEditableChange, do we want to add onAfterLayerEditableChange or just expose things as they are?

@ckaiser ckaiser requested a review from dacap as a code owner May 13, 2025 13:26
@ckaiser ckaiser assigned ckaiser and dacap and unassigned ckaiser May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy