Grip snapping to visible grid lines only
I was just experiencing an issue with grid snapping: I wanted objects to be pixel-aligned, so I turned on a 1px grid with snap.
However, Inkscape only draws lines every 10px or so, and this is the snap I end up with. I have to zoom to 800% to be able to get single-pixel snap, which is too close to be able to see what I want to do.
I went to report this as a bug but it's already been reported as 1505815 which is marked WONTFIX on the grounds that this is intentional.
What's the rationale behind this behaviour? Without wanting to revisit it too much if this has been discussed before, I can think of only one reason why this is beneficial:
1. What you see is what you get.
Whereas under my expected behaviour (specified grid was respected)
1. What you specify is what you get. 2. Zoom-independence. 3. Can work at 1:1 and use grids finer than 8px. 3. Everything else I've tried works this way eg. XaraLX, Flash
Put another way, would anyone have any objections to re-opening this?
Dan
Daniel Pope wrote:
Whereas under my expected behaviour (specified grid was respected)
- What you specify is what you get.
- Zoom-independence.
- Can work at 1:1 and use grids finer than 8px.
- Everything else I've tried works this way eg. XaraLX, Flash
I don't often use grid lines, but did yesterday afternoon and came across exactly this. My expectation was as yours, and I found it confusing.
I couldn't find any way to adjust how inkscape decides which grid lines to show (and allow snapping) at any zoom rate; it required an awful lot of zooming in and out to get the job done.
John
Daniel Pope wrote:
Put another way, would anyone have any objections to re-opening this?
I've been fighting this battle since the beginning. Users often report a desire for pixel alignment without having to work at higher zooms. The only reason I can ever remember for this being impossible is that it would violate the principle of least surprise.
A) it is necessary to hide gridlines while zoomed out or the display would be too cluttered to work. B) snapping to invisible gridlines will surprise the uninitiated. C) therefore snapping to grid can only be enabled when grid is visible and only the gridlines visible at the current zoom can be snapped to.
I do agree that this is overly limiting to knowledgeable users. Perhaps a preference could be burried deep inside some dialog where newbies would be unlikely to find it. As I said I've been fighting for this but I've been veto-ed at every juncture. Keep mentioning this issue and I'm sure someone will listen someday.
Aaron Spike
On Tue, 2007-02-20 at 12:37 -0600, Aaron Spike wrote:
I do agree that this is overly limiting to knowledgeable users. Perhaps a preference could be burried deep inside some dialog where newbies would be unlikely to find it. As I said I've been fighting for this but I've been veto-ed at every juncture. Keep mentioning this issue and I'm sure someone will listen someday.
Perhaps a setting for how they get hidden? Right now it's a little bit arbitrary, but there's no reason more lines couldn't be put on screen if someone really wanted it.
I'm still for not snapping to something you can't see.
--Ted
On Tue, Feb 20, 2007 at 08:35:56PM +0000, Ted Gould wrote:
On Tue, 2007-02-20 at 12:37 -0600, Aaron Spike wrote:
I do agree that this is overly limiting to knowledgeable users. Perhaps a preference could be burried deep inside some dialog where newbies would be unlikely to find it. As I said I've been fighting for this but I've been veto-ed at every juncture. Keep mentioning this issue and I'm sure someone will listen someday.
Perhaps a setting for how they get hidden? Right now it's a little bit arbitrary, but there's no reason more lines couldn't be put on screen if someone really wanted it.
I'm still for not snapping to something you can't see.
There are situations where I've found this would be useful. For instance, in doing room designs, I achieve scaling by setting the grid to one unit per inch. From a zoomed out view, it would be nice to be able to draw a 123 inch long wall, but because the grid point corresponding to "123" wouldn't be displayed, I find myself approximating, then zooming in a few levels and tweaking it to get it right. This isn't a huge deal - it only takes a moment to zoom in, fix the line, and go back, but it's definitely a case where snapping to a non-visible grid point would be useful. If I'm in a hurry I sometimes just use the arrow keys to nudge things closer to where I want.
However, I can also give a use case where not snapping is the preferred behavior. On more complex detail diagrams, may set the grid points to correspond to 1/8 inch, and set major grid lines every inch. Most dimensions are whole inches, but some (like board thicknesses) are fractional inches (e.g. 5/8"). So the workflow here of snapping to inches when zoomed out, and fractional inches when zoomed in, works well.
The latter use case is more important to me personally, so I like the current behavior. But I can totally understand that there are people who more often have something like the first use case, and I certainly wouldn't mind some configurable way to achieve it.
Bryce
Bryce Harrington wrote:
On Tue, Feb 20, 2007 at 08:35:56PM +0000, Ted Gould wrote:
There are situations where I've found this would be useful. For instance, in doing room designs, I achieve scaling by setting the grid to one unit per inch. From a zoomed out view, it would be nice to be able to draw a 123 inch long wall, but because the grid point corresponding to "123" wouldn't be displayed, I find myself approximating, then zooming in a few levels and tweaking it to get it right. This isn't a huge deal - it only takes a moment to zoom in, fix the line, and go back, but it's definitely a case where snapping to a non-visible grid point would be useful. If I'm in a hurry I sometimes just use the arrow keys to nudge things closer to where I want.
This is pretty close to what I was doing.
I selected Document Properties > Grid/Guides > Grid units == mm Then under "Grid Snapping" in Document Properties > Snap, I enabled "Snap bounding boxes to grid", "Snap nodes to grid", and "Always snap". None of these gave me any impression that I was enabling snapping only to a visible grid, I believed it was the grid I'd just specified on the "Grid/Guides" tab.
The Snap tab is fairly crowded, but perhaps an "even hidden gridlines" tickbox (disabled by default) would both provide the option and alert the user that grid snapping mightn't blindly work to the specified grid.
In the end I used a mixture of zooming in/out and, when it was hard to place points relative to each other without seeing the context, I disabled snapping, put points in roughly the right place, before (with snap re-enabled) jiggling the points individually to snap them again. I estimate this was, overall, 3 times slower than with snapping to all grid positions.
John
On 2007-February-20 , at 22:51 , John Pybus wrote:
Bryce Harrington wrote:
On Tue, Feb 20, 2007 at 08:35:56PM +0000, Ted Gould wrote:
There are situations where I've found this would be useful. For instance, in doing room designs, I achieve scaling by setting the grid to one unit per inch. From a zoomed out view, it would be nice to be able to draw a 123 inch long wall, but because the grid point corresponding to "123" wouldn't be displayed, I find myself approximating, then zooming in a few levels and tweaking it to get it right. This isn't a huge deal - it only takes a moment to zoom in, fix the line, and go back, but it's definitely a case where snapping to a non-visible grid point would be useful. If I'm in a hurry I sometimes just use the arrow keys to nudge things closer to where I want.
This is pretty close to what I was doing.
I selected Document Properties > Grid/Guides > Grid units == mm Then under "Grid Snapping" in Document Properties > Snap, I enabled "Snap bounding boxes to grid", "Snap nodes to grid", and "Always snap". None of these gave me any impression that I was enabling snapping only to a visible grid, I believed it was the grid I'd just specified on the "Grid/Guides" tab.
The Snap tab is fairly crowded, but perhaps an "even hidden gridlines" tickbox (disabled by default) would both provide the option and alert the user that grid snapping mightn't blindly work to the specified grid.
In the end I used a mixture of zooming in/out and, when it was hard to place points relative to each other without seeing the context, I disabled snapping, put points in roughly the right place, before (with snap re-enabled) jiggling the points individually to snap them again. I estimate this was, overall, 3 times slower than with snapping to all grid positions.
I think there is a usability argument behind this decision of not snapping to invisible grid lines, beyond the surprise effect. If you set grid lines to small distances (e.g. 1px) and zoom out a little, they become so close to each other that even snapping to those does not give you the impression of snapping at all: the next pixel is so close to the position your mouse is in that the effect of actually "snapping" is not visible anymore. Therefore I think that enabling snapping to invisible grid can lead to the impression of no snapping at all, even to the grid lines that are visible. A solution would probably be to set the threshold under which minor grid lines disappear to something smaller (or to give a preference for this), as Ted Gould suggested. Typically this cannot be smaller than at least a few screen pixels for the snapping effect to be visually noticeable. How is this threshold computed/set currently?
JiHO --- http://jo.irisson.free.fr/
jiho wrote:
I think there is a usability argument behind this decision of not snapping to invisible grid lines, beyond the surprise effect. If you set grid lines to small distances (e.g. 1px) and zoom out a little, they become so close to each other that even snapping to those does not give you the impression of snapping at all: the next pixel is so close to the position your mouse is in that the effect of actually "snapping" is not visible anymore.
Not visible, but that doesn't mean not present. If I set the snapping for all points to be on mm boundaries, then, when I have a full A4 page in my window I'd expect to be able to create objects at any screen pixel, but when I zoom in have them all on the mm (also useful for px, pt) grid. Currently, I can't do this. If I have snap sensitivity high then it'll only place points on 5mm positions. If I have snap sensitivity low then it will place points between the lines but when I zoom in they're not on the grid.
I don't suggest that snapping to invisible lines should be the default, just that it be an option. Perhaps, if the lack of user feedback in the operation is really an issue, then it needs some sort of indicator that it is activated in the UI. Personally, the fact I've had to go and hunt down the option in the Document Prefs is enough reminder for me.
A solution would probably be to set the threshold under which minor grid lines disappear to something smaller (or to give a preference for this), as Ted Gould suggested. Typically this cannot be smaller than at least a few screen pixels for the snapping effect to be visually noticeable. How is this threshold computed/set currently?
Threshold for grid line hiding might be an option, but I'd need *at least* one line per screen pixel. I could then set the grid lines transparent to see the drawing. But that's not as simple as an option for invisible snapping and 100% transparent grid lines would suffer the same usability issue.
John
On Wed, 2007-02-21 at 00:34 +0100, jiho wrote:
Typically this cannot be smaller than at least a few screen pixels for the snapping effect to be visually noticeable. How is this threshold computed/set currently?
I haven't worked with this code for quite a while, but here's what I remember (helped by src/display/canvas-grid.cpp)
Basically the grid ensures that there is always at least 8 pixels between grid lines. If there isn't at least 8, then it scales up to the major grid lines. If there is still too many is starts removing half of them until it satisfies the requirement.
--Ted
PS - Looking at this code now, it probably could be significantly optimized. It might be a fun project for someone who wants to get into the Inkscape display internals a little more.
Just a very quick reply to the whole grid discussion. I am currently reworking the grid system. Please hold on! Possible new general grid options (applying to all grids): - allow snapping to grid when invisible - minimum grid line distance
The idea is to make it easy to implement new grid types. Plus to make it possible to have multiple active grids, which can be different for each view of the document. Hope to have something fully functional soon, but time is lacking :(
On Wed, Feb 21, 2007 at 10:40:13AM +0100, J.B.C.Engelen@...1578... wrote:
Just a very quick reply to the whole grid discussion. I am currently reworking the grid system. Please hold on! Possible new general grid options (applying to all grids):
- allow snapping to grid when invisible
- minimum grid line distance
The idea is to make it easy to implement new grid types. Plus to make it possible to have multiple active grids, which can be different for each view of the document. Hope to have something fully functional soon, but time is lacking :(
Very cool, I'll look forward to playing with the new capabilities! :-)
Bryce
On 2/21/07, J.B.C.Engelen@...1578... <J.B.C.Engelen@...1578...> wrote:
- allow snapping to grid when invisible
OK, let's go with such an option, off by default, to close this issue forever :)
On 2/20/07, Aaron Spike <aaron@...749...> wrote:
I've been fighting this battle since the beginning. Users often report a desire for pixel alignment without having to work at higher zooms. The only reason I can ever remember for this being impossible is that it would violate the principle of least surprise.
So, on the one hand we have real users complaining that the program is broken, and on the other hand we have a theoretical argument about an imagined "newbie" user. In my opinion, reality should trump theory every time. Principles like "least surprise" help guide interface design when there is no data available to make informed decisions. Once real users start providing data, however, the theory must obviously take a back seat.
Even so, I think the theory of "least surprise" is being misapplied. A user who turns on the grid, even a newbie, obviously has some expectations about it. One of the biggest expectations is that objects will snap to the configured grid size. A user who sets a grid of 0.5 pixels expects objects to snap to half-pixel boundaries. It is surprising to have objects snap to 8-pixel boundaries when the grid is set to 0.5 pixels, regardless of which grid lines are visible. This isn't a theoretical argument; it is fact illustrated by the bug report and Daniel Pope's email. Even I was surprised when objects only snapped to visible grid lines, although I've gotten used to lots of zooming since then (ugh).
So, I vote that Inkscape listens to real users on this issue and removes the "WONTFIX" label from the bugreport.
-William Swanson
PS: Have any newbies _actually_ complained about objects snapping to non-visible grid lines? If some have, that would be an argument in favor of the status quo or at least a setting.
William Swanson wrote:
PS: Have any newbies _actually_ complained about objects snapping to non-visible grid lines? If some have, that would be an argument in favor of the status quo or at least a setting.
Yup, absolutley. We get complaints both ways and it isn't necessarily limited to newbies.
Aaron Spike
On 2/20/07, Aaron Spike <aaron@...749...> wrote:
William Swanson wrote:
PS: Have any newbies _actually_ complained about objects snapping to non-visible grid lines? If some have, that would be an argument in favor of the status quo or at least a setting.
Yup, absolutley. We get complaints both ways and it isn't necessarily limited to newbies.
Oh. In that case, I stand corrected.
If people want it both ways, I suppose a setting in the grid-setup dialog would be a better compromise.
-William Swanson
participants (9)
-
unknown@example.com
-
Aaron Spike
-
Bryce Harrington
-
bulia byak
-
Daniel Pope
-
jiho
-
John Pybus
-
Ted Gould
-
William Swanson