Quantcast
Channel: Northwoods Software - Latest topics
Viewing all articles
Browse latest Browse all 7406

Allow shift or option key to control grid snapping

$
0
0

@ewoudenberg wrote:

In the Guided dragging tool the shift key is used to determine whether to snap to the guideline or not:

GuidedDraggingTool.prototype.doDropOnto = function(/*pt, obj */) {
...

// snaps only when the mouse is released without shift modifier
var e = this.diagram.lastInput;
var snap = this.isGuidelineSnapEnabled && !e.shift;
this.showHorizontalMatches(part, this.isGuidelineEnabled, snap);
this.showVerticalMatches(part, this.isGuidelineEnabled, snap);
}

I'd like to add this same feature to control (e.g. disable or toggle) the normal snapping that's available when dragging and resizing (i.e. when draggingTool.isGridEnabled == true).

Is this possible? Is the dragging tool code available for modification?

Thank you

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 7406