Skip to content

Fix canvas pan behavior and export rendering regressions#2

Merged
mdadul merged 1 commit into
mainfrom
cursor/foundation-code-quality-refactor
Jun 16, 2026
Merged

Fix canvas pan behavior and export rendering regressions#2
mdadul merged 1 commit into
mainfrom
cursor/foundation-code-quality-refactor

Conversation

@mdadul

@mdadul mdadul commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • add background-only left-drag panning with movement threshold so element drag/resize interactions are not affected
  • add tests for useCanvasViewport covering threshold activation and non-stage target guards
  • fix export issues by stabilizing preview dependencies (preventing update-depth loops) and aligning fallback renderer transform origin with canvas positioning

Test plan

  • npm test -- src/hooks/useCanvasViewport.test.tsx
  • npm test -- src/lib/export/prepare-export-screen.test.ts src/hooks/useCanvasViewport.test.tsx
  • verify export no longer throws "Maximum update depth exceeded"
  • verify exported image element positions match canvas output

Made with Cursor

Add background-only left-drag panning with tests, stabilize export preview effects to prevent update loops, and align fallback export transforms with on-canvas element positioning.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying framekit with  Cloudflare Pages  Cloudflare Pages

Latest commit: d9b156f
Status: ✅  Deploy successful!
Preview URL: https://93c12fb5.framekit.pages.dev
Branch Preview URL: https://cursor-foundation-code-quali.framekit.pages.dev

View logs

@mdadul mdadul merged commit 9b9b628 into main Jun 16, 2026
2 checks passed
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.

1 participant