DragSelectingTool$Typings extension

on

Properties

box Part?
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
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
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
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
This just returns a Rect stretching from the mouse-down point to the current mouse point.
doActivate() → void
Capture the mouse and show the #box.
doDeactivate() → void
Release the mouse and remove any #box.
doMouseMove() → void
Update the #box's position and size according to the value of #computeBoxBounds.
doMouseUp() → void
Call #selectInRect with the value of a call to #computeBoxBounds.
selectInRect(Rect r) → void
This method is called to select some parts within the area of a given rectangle.