[Auto release] release 1.1.7 - #2111
Open
github-actions[bot] wants to merge 6 commits into
Open
Conversation
[Auto Sync] Sync the code from branch main to branch develop after release 1.1.6
The clone that beforeSetInteractive hoists into the interactive layer only carried globalZIndex/zIndex, so it lost the transform its source inherits from its ancestors. Drawing was unaffected because beforeDrawInteractive renders the baseGraphic and re-applies the matrix by hand, but the clone's own bounds - and therefore the bounds of the shadow root, _interactive_group and the whole _builtin_interactive layer - ended up short by that transform. pickGroup gates traversal on those bounds, so a pointer position outside the shifted box skipped the entire interactive layer and the hoisted graphic became unpickable even though it was painted on top. Give the clone a postMatrix built from its source's parent global matrix, which composes outside the local transform and reproduces what the ancestor chain contributes.
…e transform Addresses review feedback on the first pass: - graphic.clone() already copies the source postMatrix, and overwriting it with the parent global matrix dropped it. The ancestor transform is now composed with the source postMatrix instead of replacing it. - doUpdateGlobalMatrix applies the parent scrollX/scrollY after the local matrix. Since that translation sits to the right of the local matrix it cannot be pre-multiplied directly, so it is conjugated through the source transform (a pure translation stays a translation) and folded into the ancestor part, giving clonePost = P x T(own . scroll) x ownPost. - The matrix is cached on the clone and rewritten in place, so an elevated graphic no longer allocates a Matrix on every render pass. Covered by four added cases: source postMatrix, parent scroll, the two combined with a scaled ancestor and a rotated source, and matrix reuse.
…e source matrix
Measured what the two quantities actually do under a scrolling parent, with
parent {x:100, y:80, scrollX:30, scrollY:20} and a circle at {x:50, y:50}:
ordinary graphic globalTransMatrix.e/f = (180, 250)
globalAABBBounds centre = (150, 230)
painted pixels = (179.5, 249.4)
globalAABBBounds does not carry the parent scroll, while the matrix and the
painted position do. Picking pre-filters on AABBBounds, so matching the matrix
is the wrong target: it moved the clone's bounds away from the source's by
exactly the scroll.
Same setup, clone bounds centre against a source bounds centre of (150, 130):
unpatched (50, 50)
ancestor transform only (150, 130) <- matches
ancestor transform + scroll (180, 150) <- off by the scroll
So the scroll term is dropped and the test now pins that behaviour instead.
Source postMatrix preservation and the cached matrix are unchanged.
fix(core): keep the globalZIndex clone aligned with its source graphic
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.