You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my apllication, when dragging a part out of a group, the group resizes after dropping. This happens because of the settings draggingTool.isGridSnapRealtime=false and isGridSnapEnabled=true.
For now, this works for me: isGridSnapEnabled=false and with custom snap-function in DraggingTool.prototype.doDeactivate and ExternalObjectsDropped:
function snapPartToGrid(part){
if(!(part instanceof go.Link)){
var csz=part.diagram.grid.gridCellSize,
grd=part.location.snapToGrid(0,0,csz.width,csz.height);
part.move(part.findObject(part.locationObjectName).actualBounds.copy().setSpot(grd.x,grd.y,part.locationSpot).position)
}
}
The text was updated successfully, but these errors were encountered:
martienvlent
changed the title
Connot allways drag parts out of group
Cannot allways drag parts out of group
Dec 21, 2014
In my apllication, when dragging a part out of a group, the group resizes after dropping. This happens because of the settings draggingTool.isGridSnapRealtime=false and isGridSnapEnabled=true.
For now, this works for me: isGridSnapEnabled=false and with custom snap-function in DraggingTool.prototype.doDeactivate and ExternalObjectsDropped:
function snapPartToGrid(part){
if(!(part instanceof go.Link)){
var csz=part.diagram.grid.gridCellSize,
grd=part.location.snapToGrid(0,0,csz.width,csz.height);
part.move(part.findObject(part.locationObjectName).actualBounds.copy().setSpot(grd.x,grd.y,part.locationSpot).position)
}
}
The text was updated successfully, but these errors were encountered: