DragSelectingTool$Typings extension

on

Properties

box Part?

Available on DragSelectingTool, provided by the DragSelectingTool$Typings extension

Gets or sets the Part used as the "rubber-band selection box" that is stretched to follow the mouse, as feedback for what area will be passed to #selectInRect upon a mouse-up.
getter/setter pair
delay num

Available on DragSelectingTool, provided by the DragSelectingTool$Typings extension

Gets or sets the time in milliseconds for which the mouse must be stationary before this tool can be started. The default value is 175 milliseconds. Setting this property does not raise any events.
getter/setter pair
isPartialInclusion bool

Available on DragSelectingTool, provided by the DragSelectingTool$Typings extension

Gets or sets whether a selectable Part may be only partly or must be completely enclosed by the rectangle given to #selectInRect. The default value is false: parts must be completely inside the rectangle. Setting this property does not raise any events.
getter/setter pair

Methods

canStart() bool

Available on DragSelectingTool, provided by the DragSelectingTool$Typings extension

This tool can run when the diagram allows selection, there has been delay of at least #delay milliseconds after the mouse-down before a mouse-move, there has been a mouse-drag far enough away not to be a click, and there is no selectable part at the mouse-down point.
computeBoxBounds() Rect

Available on DragSelectingTool, provided by the DragSelectingTool$Typings extension

This just returns a Rect stretching from the mouse-down point to the current mouse point.
doActivate() → void

Available on DragSelectingTool, provided by the DragSelectingTool$Typings extension

Capture the mouse and show the #box.
doDeactivate() → void

Available on DragSelectingTool, provided by the DragSelectingTool$Typings extension

Release the mouse and remove any #box.
doMouseMove() → void

Available on DragSelectingTool, provided by the DragSelectingTool$Typings extension

Update the #box's position and size according to the value of #computeBoxBounds.
doMouseUp() → void

Available on DragSelectingTool, provided by the DragSelectingTool$Typings extension

Call #selectInRect with the value of a call to #computeBoxBounds.
selectInRect(Rect r) → void

Available on DragSelectingTool, provided by the DragSelectingTool$Typings extension

This method is called to select some parts within the area of a given rectangle.