DWVv0.37.0

DrawSelect

Source: drawSelect.js:14

Draw select class.


Constructor

new DrawSelect( app: App, shapeHandler: DrawShapeHandler, ): DrawSelect

Parameters

  • app (App) — The application.
  • shapeHandler (DrawShapeHandler) — Handler for selecting and editing existing shapes.

Instance Methods

setFeatures(features: object)

Parameters

  • features (object) — Live features (validator, …).

checkCanEdit(drawLayer: DrawLayer): boolean

Check if the draw data can be edited.

Parameters

Returns

  • boolean — True if the data is editable.

trySelectShapeGroup( point: Point2D, drawLayer: DrawLayer, ): boolean

Try to select an existing shape at the pointer.

Parameters

Returns

  • boolean — True if successful.

activate(flag: boolean)

Parameters

  • flag (boolean) — True to activate.