InteractionConfiguration class final

Defines the set of interactive operations you can enable or disable for a VertexTool, FreehandTool, or ShapeTool.

An InteractionConfiguration allows you to customize the interactive geometry editing experience to suit your specific users. For example:

You can tap multiple times on any GeometryEditorElement to select the different types of GeometryEditorElement representing vertices, parts, and the entire geometry. For example if all elements are allowed to be selected:

  • tap twice on a vertex of a Multipoint to select first the vertex and then the entire multipoint geometry
  • tap three times on a vertex of a Polyline or Polygon to select first the vertex, then the part, and then the entire geometry
  • tap twice on an edge of a Polyline or Polygon to select first the part and then the entire geometry
  • tap twice on a fill of a Polygon to select first the part and then the entire geometry

Depending on the values of InteractionConfiguration.allowMovingSelectedElement, InteractionConfiguration.allowRotatingSelectedElement, and InteractionConfiguration.allowScalingSelectedElement, visual handles are displayed to help the user move, rotate, or scale the selected element.

You can change the interaction properties of a tool at any point, including when a geometry editor is started (GeometryEditor.isStarted = true) and the tool is in use by the editor. If you change a property that disallows an in-progress interaction, then the interaction is cancelled and does not affect the state of the GeometryEditor.

Changing InteractionConfiguration properties affects whether types of interaction (such as tapping or dragging) to add new vertices or parts are enabled or not, but never affects the type of interaction used by each different GeometryEditorTool to create new vertices and parts. For example, a VertexTool adds vertices in response to a tap, whereas both FreehandTool and ShapeTool add parts in response to a drag operation but never in response to a tap.

Convenience methods are available to quickly set all properties relative to a category of interaction - for example use InteractionConfiguration.setAllowSelection to change all selection interactions, and InteractionConfiguration.setAllowTransformation to change all properties that control geometry transformation.

Implemented types

Constructors

InteractionConfiguration()
Creates an InteractionConfiguration that enables selection, transformation and deletion.
factory

Properties

allowDeletingSelectedElement bool
True if the selected GeometryEditorElement can be interactively deleted, false otherwise. Default is true.
getter/setter pair
allowGeometrySelection bool
True if the entire geometry can be interactively selected, false otherwise. Default is true.
getter/setter pair
allowMidVertexSelection bool
True if a mid-vertex of a polygon or polyline can be interactively selected, false otherwise. Default is true.
getter/setter pair
allowMovingSelectedElement bool
True if the selected GeometryEditorElement can be interactively moved, false otherwise. Default is true.
getter/setter pair
allowPartCreation bool
True if you can interactively create a new part in a polyline or polygon, false otherwise. Default is true.
getter/setter pair
allowPartSelection bool
True to allow a part of a Multipart geometry (Polyline or Polygon) to be selected interactively, false otherwise. Default is true.
getter/setter pair
allowRotatingSelectedElement bool
True to allow you to interactively rotate the selected GeometryEditorElement, false otherwise. Default is true.
getter/setter pair
allowScalingSelectedElement bool
True to allow you to interactively scale the selected GeometryEditorElement, false otherwise. Default is true.
getter/setter pair
allowVertexCreation bool
True to allow a vertex to be created interactively, false otherwise. Default is true.
getter/setter pair
allowVertexSelection bool
True to allow vertices to be selected interactively, false otherwise. Default is true.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
requireSelectionBeforeMove bool
True to require a GeometryEditorElement to first be selected before it can be moved by interactively dragging, false otherwise. Default is false.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaleMode GeometryEditorScaleMode
Determines how a geometry can be interactively scaled (resized) to fill its allocated space while using the GeometryEditor.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAllowCreation(bool allowCreation) → void
Enable or disable creation.
setAllowDeletion(bool allowDeletion) → void
Enable or disable deletion.
setAllowSelection(bool allowSelection) → void
Enable or disable selection.
setAllowTransformation(bool allowTransformation) → void
Enable or disable interactions that transform the GeometryEditor.geometry, for example InteractionConfiguration.allowMovingSelectedElement.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited