Dragging Multiple Objects On A Grid Can Mess Up Alignment

Bug #414783 reported by bcwhite
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Diederik van Lierop

Bug Description

Inkscape 0.46 (awesome program -- kudos!)

Dragging a single object around snaps to the grid. Great. However, when multiple items are selected, it selects some object/node and keeps that snapped to the grid. If that node was not previously aligned, it will now become so and everything that was aligned will become offset.

I suggest that, if more than one object is selected, then the movement be restricted to increments of the grid size rather that snapping a particular node to the grid. This method will ensure that aligned nodes will remain aligned when moved together with unaligned nodes.

-- Brian

Tags: grids snapping
Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

There is a work around in the upcoming v0.47 for this: go to the preferences -> snapping and select "snap only the node closest to the mousepointer". Now grab the selection near the point which you want to snap, and only that point will snap! So, you might want to test our prerelease and see if you like it.

Otherwise your request is valid, but I'm not sure how to implement this properly from a usability perspective. Changing the behavior based upon the size of the selection will be confusing. For this we should use a modifier key, but I think all are occupied in the selector tool. Maybe we should have a toggle button for this on the snap toolbar (new in v0.47)? Or use the "G" key for this? Maybe someone has a better idea?

Revision history for this message
bcwhite (bcwhite) wrote :

I'll try that when I get a chance to install the new version. However, it assumes that I know which point is aligned on the grid. I find that they move off the grid, specifically when I change text from left-aligned to right- or center-aligned.

I don't think it would be confusing to the user to have the behavior change slightly when more than one object is select. I think of it this way...

- When one object is selected and I move it, it jerks into alignment, then moves in chunks of the grid size.

- When more than one object is select, they move in chunks of the grid size.

The latter case behaves the same way as the former, but without the initial lurch.

-- Brian

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote : Re: [Bug 414783] Re: Dragging Multiple Objects On A Grid Can Mess Up Alignment

On 08/17/2009 10:46 PM, bcwhite wrote:
> I'll try that when I get a chance to install the new version. However,
> it assumes that I know which point is aligned on the grid. I find that
> they move off the grid, specifically when I change text from left-
> aligned to right- or center-aligned.
>

Yes, that's because modifications to objects like that do not care about
the grid at all. The grid is only used when dragging or drawing.

> - When one object is selected and I move it, it jerks into alignment,
> then moves in chunks of the grid size.
>

So for example, once you get the lower left corner of a rectangle
snapped to the grid, you cannot get the upper right corner snapped
without disabling the snapping? Or am I overlooking some obvious
solution here? And even if you do disable the snapping, move the
rectangle, and enable snapping again, you still cannot make sure that
the upper right corner will snap because Inkscape might just as well
decide to snap the lower left corner again and continue moving in grid
multiples?

No, it's not a solution to only use rectangles measuring an integer
multiple in both width and height ;-)

Revision history for this message
bcwhite (bcwhite) wrote : Re: [Bug 414783] Re: Dragging Multiple Objects On A Grid Can Mess Up Alignment

Sorry; I wasn't clear...

If I use the text tool, click somewhere, and start typing, it creates a text
box that isn't aligned to the grid boundary. If I then switch to the arrow,
select the text-box, and drag it, the corner of the box will first lurch to
a grid boundary and then move in increments of the grid size.

If I create two unaligned text boxes this way, select both, and drag, then
one of the boxes will lurch into alignment with the other staying in the
same position relative to the first. I expect the latter (relative position
remains unchanged) but would prefer that the program not guess at my
absolute alignment intentions and instead just move all objects in
increments of the grid size with no initial repositioning to a boundary.

 Brian
 <email address hidden>
-----------------------------------------------------------------------------------------
Treat someone as they are and they will remain that way.
Treat someone as they can be and they will become that way.

tags: added: grids snapping
Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

That initial repositioning is caused by the snapping, if I understand you correctly. Afterwards it will indeed move in multiples of the grid pitch, but that's due to the same snapping mechanism. There's another option though: when using the selector tool to move around an object, you can hold the ALT key to constrain the translations to multiples of the grid pitch. It doesn't really snap, which will avoid the initial repositioning effect you described. So once you have aligned an object to the grid the way you want it to, this allows you to keep it aligned to that grid while moving it around.

PS: When creating a text frame it will snap too as of rev. v0.49

Revision history for this message
bcwhite (bcwhite) wrote : Re: [Bug 414783] Re: Dragging Multiple Objects On A Grid Can Mess Up Alignment

> That initial repositioning is caused by the snapping, if I understand
> you correctly. Afterwards it will indeed move in multiples of the grid
> pitch, but that's due to the same snapping mechanism. There's another
> option though: when using the selector tool to move around an object,
> you can hold the ALT key to constrain the translations to multiples of
> the grid pitch. It doesn't really snap, which will avoid the initial
> repositioning effect you described. So once you have aligned an object
> to the grid the way you want it to, this allows you to keep it aligned
> to that grid while moving it around.
>

I understand, but "snapping" makes no sense when multiple points are
selected because the points may not be aligned in any particular way. That
means that you need to choose some point and snap that one with all the
others following. Given that every time this is done, it's possible (if not
likely) that a different point will be choose as the "snap point" and thus
completely screw up the alignment of all other points that aren't aligned
with the one chosen.

My report was to suggest that it would be better to not try to snap at all
when multiple points are selected but rather only move in steps of the
alignment size so as to at least keep the grid-alignment of all points
unchanged. It sounds like holding ALT will do this, but I think it should
be the only behavior when multiple points are selected.

  Brian
  <email address hidden>
-----------------------------------------------------------------------------------------
Treat someone as they are and they will remain that way.
Treat someone as they can be and they will become that way.

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote : Re: [Bug 414783] Re: Dragging Multiple Objects On A Grid Can Mess Up Alignment

On 10/03/2010 10:21 PM, bcwhite wrote:
> It sounds like holding ALT will do this, but I think it should
> be the only behavior when multiple points are selected.
>

This would mean that any object having more than one point (i.e. all
objects) should only move in multiples of the grid pitch, if snapping
has been enabled.

So as soon as a grid is shown, it would no longer be possible to move
anything off-grid, or to align a point that was previously unaligned. We
will also run in some other difficulties, for example when multiple
grids are used or when "always snap to grid" has not been enabled. I
believe our current implementation is better in this respect. No one is
really annoyed (or are you ;-)?), but it is still possible to get the
behavior you like by holding ALT.

Revision history for this message
bcwhite (bcwhite) wrote : Re: [Bug 414783] Re: Dragging Multiple Objects On A Grid Can Mess Up Alignment

> On 10/03/2010 10:21 PM, bcwhite wrote:
> > It sounds like holding ALT will do this, but I think it should
> > be the only behavior when multiple points are selected.
> >
>
> This would mean that any object having more than one point (i.e. all
> objects) should only move in multiples of the grid pitch, if snapping
> has been enabled.
>

Sorry, I should have said "when multiple objects are selected".

> So as soon as a grid is shown, it would no longer be possible to move
> anything off-grid, or to align a point that was previously unaligned. We
> will also run in some other difficulties, for example when multiple
> grids are used or when "always snap to grid" has not been enabled. I
> believe our current implementation is better in this respect. No one is
> really annoyed (or are you ;-)?), but it is still possible to get the
> behavior you like by holding ALT.
>

I found it very frustrating. I had a dozen objects, many of which were
aligned to the grid (and each other) but some were not. Trying to drag them
all to the right to make some room would cause them all to "pop" so that
some arbitrary point was on the grid. If that arbitrary point happened to
be on one of the non-grid-aligned objects that suddenly all my grid-aligned
objects were no longer grid-aligned.

Holding ALT did not help. The arbitrary point snaps to the grid first,
possibly destroying the alignment of other points. After that, any
constrained movement just maintains the problem.

  Brian
  <email address hidden>
-----------------------------------------------------------------------------------------
Treat someone as they are and they will remain that way.
Treat someone as they can be and they will become that way.

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

ALT should really do the job! What version of Inkscape are you using?

Revision history for this message
bcwhite (bcwhite) wrote :

> ALT should really do the job! What version of Inkscape are you using?
>

None any longer. I finished my SVG work about a year ago and haven't needed
to go back to it since.

  Brian
  <email address hidden>
-----------------------------------------------------------------------------------------
Treat someone as they are and they will remain that way.
Treat someone as they can be and they will become that way.

Revision history for this message
su_v (suv-lp) wrote :

Closing - as discussed in the comments, Inkscape >= 0.47 has sufficiently fine-grained options to allow to adjust how a selection of multiple objects snaps to the currently displayed grid when dragging it with the mouse ("snap only the node closest to the mousepointer", "hold the ALT key to constrain the translations to multiples of the grid pitch").

Changed in inkscape:
milestone: none → 0.47
status: New → Fix Released
assignee: nobody → Diederik van Lierop (mail-diedenrezi)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.