Appearance
Ogma.tools.rectangleSelect
Rectangle Select API: functions to select nodes and edges by drawing a rectangle.
ogma.tools.rectangleSelect.disable()
Disable the rectangle selection.
ogma.tools.rectangleSelect.enable([options])
Enable the selection by rectangle tool, allowing the user to select some nodes by drawing a rectangle on the screen.
Arguments
- options(optional)
object
- bothExtremities(optional)
boolean
[=false]
If set totrue
, edge will be passed tocallback
only if both of its ends are inside the selected area. By default, just one endpoint inside the selection is enough to be included. - callback(optional)
function(evt: {nodes: NodeList, edges: EdgeList})
Called with the nodes/edges surrounded by the rectangle. By default, add the surrounded nodes to the selection. If there is no surrounded node, add the surrounded edges instead. - cursorStyle(optional)
CursorStyle
[="cell"]
Cursor style when the rectangle is active (CSS property) - fillColor(optional)
Color|null
[="rgba(0,195,255,0.1)"]
Rectangle fill color - strokeColor(optional)
Color
[="#00C3FF"]
Rectangle stroke color - strokeWidth(optional)
number
[=1]
Rectangle stroke width
- bothExtremities(optional)
ogma.tools.rectangleSelect.enabled()
Indicates if the rectangle selection is enabled.
Returns
-
boolean