Skip to content

[Auto release] release 1.1.7 - #2111

Open
github-actions[bot] wants to merge 6 commits into
mainfrom
release/1.1.7
Open

[Auto release] release 1.1.7#2111
github-actions[bot] wants to merge 6 commits into
mainfrom
release/1.1.7

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

No description provided.

xuefei1313 and others added 6 commits July 30, 2026 11:43
[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
@github-actions
github-actions Bot requested a review from xile611 August 2, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant