Bug 522713

Summary: Snap to grid constraint is not taken into account during drag and drop of border node.
Product: [Modeling] Sirius Reporter: Jessy Mallet <jessy.mallet>
Component: DiagramAssignee: Project Inbox <sirius.diagram-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: florian.barbin
Version: unspecifiedKeywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Windows NT   
Whiteboard:
Attachments:
Description Flags
Test case used to reproduced the problem.
none
ScreenShot of the DnD behaviour. none

Description Jessy Mallet CLA 2017-09-25 05:39:30 EDT
Created attachment 270337 [details]
Test case used to reproduced the problem.

On diagram with "Snap to grid" activated, when user wants to drag and drop a border node on the grid, two possibilities are offers. First one, it is snapped to the grid and second one, it can be very close to another one without being snapped. The second choice can not be possible if there is possibilities to snap on the grid.

I think , all border nodes should take into account "Snap to grid" constraints when grid spacing is sufficient.


Step to reproduce :
* import in your workspace the modeling project DragAndDropBorderNode.zip,
* open representation "new packageDiag",
* make sure that "Snap to Grid" box is marked in properties view of diagram (tab Rulers&Grid) and set the grid spacing to 80 pixels. 
* drag and drop C2 class close to C1, it is possible and not snapped on the grid -> KO
  the border node should be aligned on the grid.
Comment 1 Jessy Mallet CLA 2017-09-25 05:45:17 EDT
Created attachment 270338 [details]
ScreenShot of the DnD behaviour.
Comment 2 Florian Barbin CLA 2017-09-28 03:21:40 EDT
Issue reproduced and marked as triaged.