Bug 150988 - Snap to Grid should allow snapping from any side
Summary: Snap to Grid should allow snapping from any side
Status: CLOSED DUPLICATE of bug 173669
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy GEF (MVC) (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 119248
  Show dependency tree
 
Reported: 2006-07-18 14:30 EDT by Tom Macdougall CLA
Modified: 2010-02-17 22:11 EST (History)
1 user (show)

See Also:


Attachments
patch for snap to grid (2.14 KB, patch)
2006-07-18 14:39 EDT, Tom Macdougall CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Macdougall CLA 2006-07-18 14:30:37 EDT
It seems that Snap to Grid only snaps to top left grid corners but not to right or bottom grid lines.
Comment 1 Tom Macdougall CLA 2006-07-18 14:39:05 EDT
Created attachment 46465 [details]
patch for snap to grid

The patch calculates the correction to the left, right, top and bottom and sets the correction values to the nearest grid corner. This bug was originally raised against GMF [Ref 119248]. Please let me know if this change in behavior is desired and applicable to GEF. I will mark the GMF bug dependent on this bug.
Comment 2 Randy Hudson CLA 2006-07-19 09:16:22 EDT
Can you refer to any applications such as powerpoint of visio that implement the proposed behavior? It seems counter-intuitive, as it breaks the desired behavior, which is to have the top-left corner always aligned with the grid.
Comment 3 Tom Macdougall CLA 2006-07-19 10:23:57 EDT
It was suggested that we might add this behavior as a mode then. The user could choose to use the functionality programmatically. The default behavior would remain as it is today thereby not interfering with existing systems. Please let me know what you think.
 
Comment 4 Randy Hudson CLA 2006-07-19 11:01:15 EDT
Based on my experience with other software (MS Office, Photoshop, etc.), the definition of snap to grid is *always* snap the top-left corner to the grid. There could be a case where snapping to the right or bottom is different by 1 pixel, and the user wouldn't realize that there intent was not carried out.

Could you please explain the real use case where the bottom right should be snapped, but not the top left. For example, I would have to assume the object is not resizable, otherwise, why wouldn't I just want the entire bounds to be on the grid? Perhaps what would be more useful is a "desktop" layout similar to the windows desktop, in which the top-center of a non-resizable object is aligned to an imaginary grid.
Comment 5 Anthony Hunter CLA 2007-10-31 14:50:16 EDT
I think we are saying that the patch is invalid as it changes the current GEF default implementation, which is snap to the upper left only. We need to allow for extensibility so that an application can override. We want the standard for GMF to be all four sides.

p.s. I tried Adobe Photoshop and it snaps to all four sides of the grid.
Comment 6 Anthony Hunter CLA 2010-02-17 22:11:26 EST

*** This bug has been marked as a duplicate of bug 173669 ***