fix(editor): address snapping review feedback after merge

- Preserve transformed Control-bypass movement and hide invalid snap targets
- Route native snapping toggles through persisted preference actions
- Harden axis tolerance, resize behavior, and guide repaint lifecycle
- Keep fractional coordinates visible and clarify localized setting descriptions
This commit is contained in:
Danila Poyarkov 2026-08-18 23:12:02 +03:00
parent e0491ed0ae
commit b48fe1623b
2 changed files with 3 additions and 3 deletions

View file

@ -228,7 +228,7 @@ function clearResizedRawGeometry(editor: Editor, nodeId: string): void {
export function commitResizePreview(dragState: DragResize, editor: Editor) {
// See applyResize — reactive drag state must not leak into graph writes.
const d = toRaw(dragState)
if (editor.state) editor.state.snapGuides = []
editor.state.snapGuides = []
const node = editor.graph.getNode(d.nodeId)
if (!node) return
const finalChanges = snapshotResizeFinal(node)

View file

@ -79,8 +79,8 @@ export function applyResizeSnap(
editor: Editor,
disableSnapping: boolean
): Rect {
if (disableSnapping || !editor.state) {
if (editor.state) editor.state.snapGuides = []
if (disableSnapping) {
editor.state.snapGuides = []
return rect
}