Closed ptrmsk closed 1 year ago
The behavior is correct -- grid snapping tries to align the Part.location point to the grid. In that SnapLinkReshaping sample, the nodes have Part.locationSpot set to go.Spot.Center
. So the DraggingTool is snapping the center point of the nodes to the grid, not the top-left corner.
In your app you could not bother setting Part.locationSpot, because the default value is go.Spot.TopLeft
.
It appears grid snap is not always consistent, especially when trying to position objects of different sizes (even when they have the same model). For example, on this page, load the following data:
I tried left-aligning them on the grid, and this about as close as I could get (red line for emphasis):
Tested in both Firefox and Chrome. I also downloaded/modified the SnapLinkReshaping.html file to make sure the default gridSnap also has this issue: