An editor that allows editing and creation of features with a geobuffer shape.

Handles

The geobuffer editor defines the following edit handles:
GeoBufferEditor handles
GeoBufferEditor handles
  • Base shape handles (A): These handles are created by createShapeHandles. See GeoBuffer.isSupportedBaseShape for a list of supported geobuffer base shape types. In the image above, the base shape is a PointListEditor.
  • Width handle (B): This handle allows the user to change the geobuffer's width. The user can do this by dragging the stroke of the geobuffer. The default width handle also draws a helper shape that previews the new width of the geobuffer. In the image above, the width helper shape is the gray zone around the letter B.
  • Helper handle: A non-interactive handle, it paints helper lines for the GeoBuffer. The helper lines are the grey lines in the image above. They visualize the base shape of the geobuffer. This does not include the gray zone of the width handle, around the letter B.
  • Shape translate handle: This handle translates (moves) the entire GeoBuffer shape. The light blue area in the image above indicates where the shape translate handle is active. This includes the red stroke.

Creation

The Editor.getCreateHandle of the width is changed to a default size.

2022.1

Hierarchy (View Summary)

Constructors

Accessors

Methods

  • Restores the feature of the given context to a previously saved state.

    This applies the saved state that was created by saveState to the context's EditContext.feature. It is used to revert back to the initial state when editing is cancelled (ie. the controller deactivates without finishing) or restarted. When editing is cancelled, restoreState is called to revert the edited feature back to its initial state.

    The default implementation updates the feature's shape to the shape that was returned by the saveState method If your editor / handles change other feature properties, you can override saveState and restoreState to save and restore these additional properties as well.

    Parameters

    • savedState: any

      The state that was saved, as returned by saveState.

    • context: EditContext

      The editing context.

    Returns void

    2024.0

  • Returns a save state of the feature in the given context being edited.

    This save state is used to revert back to the initial state when editing is cancelled (ie. the controller deactivates without finishing) or restarted. When editing is cancelled, restoreState is called to revert the edited feature back to its initial state.

    The default implementation saves a copy of the feature's shape. If your editor / handles change other feature properties, you can override saveState and restoreState to save and restore these additional properties as well.

    Parameters

    Returns any

    The save state. By default, this is a copy of the feature's shape.

    2024.0