documentationfor yFiles for HTML 2.6

LassoSelectionInputMode

An IInputMode implementation that can handle lasso selections performed by the user with a mouse or via touch.

Inheritance Hierarchy
LassoSelectionInputMode
Implemented Interfaces

Remarks

This implementation will request the mutex as soon as it recognizes a mouse or touch drag.

By default the lasso is a single freehand gesture. However, both a polyline path and mixed freehand/polyline paths are possible with different configuration.

Per default the visualization of the lasso selection region uses the secondaryColor of the set theme. This can be customized by setting another stroke or fill or registering a Stroke or Fill using the LASSO_STROKE_KEY or LASSO_FILL_KEY.

This mode is exclusive by default.

Examples

The LassoSelectionInputMode can easily be configured for different gestures, e.g. for a polyline path instead of the default freehand configuration:
const lassoSelectionInputMode = graphEditorInputMode.lassoSelectionInputMode
lassoSelectionInputMode.dragFreeRecognizer = MouseEventRecognizers.DRAG
lassoSelectionInputMode.startSegmentRecognizer = EventRecognizers.ALWAYS
lassoSelectionInputMode.endSegmentRecognizer =
  EventRecognizers.createOrRecognizer(
    MouseEventRecognizers.LEFT_IS_DOWN,
    MouseEventRecognizers.LEFT_UP
  )
lassoSelectionInputMode.dragSegmentRecognizer =
  MouseEventRecognizers.MOVE_OR_DRAG
lassoSelectionInputMode.finishRecognizer =
  MouseEventRecognizers.LEFT_DOUBLE_CLICK
lassoSelectionInputMode.finishRadius = 10

Type Details

yfiles module
view-component
yfiles-umd modules
All view modules
Legacy UMD name
yfiles.input.LassoSelectionInputMode

See Also

Constructors

Properties

Methods

Events

Constants