excalidraw icon indicating copy to clipboard operation
excalidraw copied to clipboard

add option to disable snap to grid in grid mode

Open valvas29 opened this issue 4 years ago • 5 comments

Hey!

the snap to grid functionality makes certain lines impossible, like:

grafik

I think it would be nice to be able to disable this feature from time to time (whilst keeping the grid!) just so such lines could be drawn without using the freehand-drawn line, which makes the sketch a little messy.

Thanks for your work!

valvas29 avatar Mar 21 '22 14:03 valvas29

This can be done by temporarily disabling the grid (Ctrl-'), drawing the line you want, and then re-enabling the grid again. Snap-to-grid is only enabled when the grid is displayed.

warwickharvey avatar Dec 23 '22 16:12 warwickharvey

Some people prefer a checkered sheet for drawing without the snap-to-grid feature. I've had numerous such requests raised for the Excalidraw Obsidian plugin. Being able to disable the snap-to-grid feature when the grid is visible would be great.

Also, the keyboard shortcut is cumbersome to invoke on a tablet or a phone.

zsviczian avatar Dec 23 '22 17:12 zsviczian

Sure, I wasn't suggesting things shouldn't be improved, I was just sharing the work-around I found when I had the same problem.

warwickharvey avatar Dec 23 '22 18:12 warwickharvey

Not sure we'd expose that to the UI, at least not now, but happy to add support for this and put it behind a shortcut (Cmd/Ctrl-Shift-;). PRs welcome!

Also, the keyboard shortcut is cumbersome to invoke on a tablet or a phone.

The shortcut came before we did, I don't make the rules, sorry 😊. (How do you use shortcuts on mobile anyway?)

dwelle avatar Dec 23 '22 18:12 dwelle

How do you use shortcuts on mobile anyway?

I have a blue tooth keyboard.

zsviczian avatar Dec 23 '22 19:12 zsviczian

If we have a free modifier or a modifier combo we should use it to disable snapping. I just wanted use the grid to position text inside of it, but precisely resizing the text and moving it, with grid snapping enabled, is not possible.

xixixao avatar Feb 06 '23 15:02 xixixao

The only viable one is Cmd, but if we overload it with "temporarily enable snapping" as tldraw does then we'll have the behaviors working against each other.

dwelle avatar Feb 07 '23 12:02 dwelle