Community
Participate
Working Groups
It seems that Snap to Grid only snaps to top left grid corners but not to right or bottom grid lines.
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.
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.
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.
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.
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.
*** This bug has been marked as a duplicate of bug 173669 ***