Skip to content

Conversation

@vitormattos
Copy link
Member

The mixin was caching canvas width/height in mounted() hook, which caused drag boundaries to become incorrect when the canvas size changed due to zoom operations (scale property changes).

This fix replaces the cached pageWidth/pageHeight with a getCurrentPageDimensions() method that queries the canvas dimensions on-demand, ensuring elements can move within the correct boundaries regardless of zoom level.

Fixes draggable element boundaries when PDF zoom changes.

The mixin was caching canvas width/height in mounted() hook,
which caused drag boundaries to become incorrect when the canvas
size changed due to zoom operations (scale property changes).

This fix replaces the cached pageWidth/pageHeight with a
getCurrentPageDimensions() method that queries the canvas
dimensions on-demand, ensuring elements can move within the
correct boundaries regardless of zoom level.

Fixes draggable element boundaries when PDF zoom changes.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos vitormattos self-assigned this Dec 2, 2025
@vitormattos vitormattos merged commit d193ec7 into main Dec 2, 2025
5 checks passed
@vitormattos vitormattos deleted the fix/dynamic-canvas-dimensions branch December 4, 2025 19:13
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