pintoTop - #28
Merged
Merged
Conversation
pinToTop: element-level pin-to-top overlays
…nged Cache the computed wrapper matrix per record and short-circuit _syncRecord when it's bit-identical to the previous frame (static QR on a still screen), avoiding the decompose and seven property writes. Also skip setBounds when the anchor's bounds are unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A Placeholder pinned above another layer (the connect-screen QR over the
flung-emoji layer) was being defeated at several points:
- Placeholder.updateZIndex re-inserted the inner placeholder next to its
source element every tick, dragging it back out of the pin layer.
Skip that reordering when the placeholder is pinned (obj._pinnedToTop,
set by Pinner on pin and cleared on _restore).
- _syncRecord read the anchor's concatenated matrix without guarding,
which threw ("reading 'x' of undefined") and broke the tick loop while
the anchor subtree was still being built. Guard it and skip the frame.
- getBounds() (optional, only for bounds-sizing children) was bundled
into the same read as the matrices, so a MovieClip anchor whose
getBounds() throws persistently made _syncRecord bail every frame and
left the pin stuck at the pin-container origin. Read bounds in its own
try/catch so a throw there never blocks positioning.
Adds tools/pin-placeholder-test.js covering the z-index case and extends
pin-test.js to assert positioning survives a persistently-throwing
getBounds().
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ixes # Conflicts: # app/scripts/CatLab/Easelbone/EaselJS/Pinner.js # dist/scripts/easelbone.js
fix(pinner): make pinToTop robust for pinned Placeholders
|
📦 PR Preview deployed! Examples are available at: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.