mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-30 02:04:54 +01:00
Figma's help says they "always snap to the pixel grid, even if Snap to pixel grid is disabled". In FigCraft they followed the setting like any layer, and since #2031 a snap to a layer off the grid wins over the grid, so a frame dragged next to a neighbour at 100.4 landed at 100.4 and the whole numbers inside it sat between pixels. A move, resize or draw of frames, sections, components, component sets and instances now rounds to whole pixels before and after object snapping, whatever Snap to pixel grid says. A moved one also lands on whole pixels of its parent (`snap::settle_on_pixels`), so a frame already off the grid comes back onto it. Other layers keep #2031's order: the pixel grid first, then the snap to a layer wins. The move rounds the drag itself rather than each layer afterwards, so the preview keeps its shifted-layers fast path for frames already on the grid.