Skip to content

Fix widget size (zoom) breaking grid snap and containment in the design editor - #3441

Merged
Salvialf merged 3 commits into
developfrom
fix/plan-widget-zoom
Jul 27, 2026
Merged

Fix widget size (zoom) breaking grid snap and containment in the design editor#3441
Salvialf merged 3 commits into
developfrom
fix/plan-widget-zoom

Conversation

@Salvialf

Copy link
Copy Markdown
Contributor
  • _plan.css.zoom could be stored as an empty string when the "Taille du widget" field was saved while left blank. init(value, default) only treats undefined/null as unset, not '', so zoomScale ended up NaN for these widgets, breaking both grid snap and containment entirely. Now explicitly falls back to 1 when the parsed value is NaN.
  • Reworked the zoom-compensated drag handling so grid snap keeps working correctly for widgets with an explicit size other than 1, and so dragging one now keeps it within the design bounds (previously fully disabled as soon as the size differed from 1).
  • Added the same kind of correction to resizing: a zoomed widget resized past the design's edge is now brought back within bounds once the resize ends, instead of being left overflowing.
  • Removed the now-outdated tooltip warning on "Taille du widget", since the placement/grid-snap issues it warned about are fixed.

Closes #3438

@Salvialf Salvialf added the changelog-fix Use to generate release notes / changelog To be apply on PR label Jul 27, 2026
@Salvialf
Salvialf merged commit 1f24d14 into develop Jul 27, 2026
6 checks passed
@Salvialf
Salvialf deleted the fix/plan-widget-zoom branch July 27, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-fix Use to generate release notes / changelog To be apply on PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants