Skip to content

fix(canvas): stop the layer-order render loop during region drag - #77

Merged
howdeploy merged 1 commit into
howdeploy:mainfrom
SaneSanders:fix/region-drag-render-loop
Sep 26, 2026
Merged

howdeploy merged 1 commit into
howdeploy:mainfrom
SaneSanders:fix/region-drag-render-loop

Conversation

@SaneSanders

Copy link
Copy Markdown
Contributor

Summary

  • reconcileCanvasLayerOrder returns the current array when the layer order is unchanged, so setLayerOrder bails out.
  • During a region drag previewDelta is recreated on every render, which gives activeLayerIds a new identity each time; with the old always-new array the layer-order effect re-rendered the canvas without end.

Test plan

  • npm test (852/852)
  • npm run typecheck
  • Live, dragging a region on dab5479: 23 × "Maximum update depth exceeded" per gesture → 0

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