Options
All
  • Public
  • Public/Protected
  • All
Menu

An Editor describes how features or shapes should be edited and created.

It creates handles that are used by the EditController to edit features and the CreateController to create new features.

Edit handles generally correspond to the shape of the feature being edited. For example, to edit a four-sided polygon, an Editor might create five handles: four to move each of the individual vertices of the polygon (see getEditHandles), and a fifth one to move the polygon as a whole (see createTranslateHandle).

For more information, check out the Customizing creation and editing guide.

see

EditHandle

see

EditController

see

CreateController

see

ShapeEditor

since

2022.1

Hierarchy

Overview

Constructors

constructor

  • Creates a new Editor instance

    Returns Editor

Methods

canEdit

  • Indicates which features/shapes this editor can edit.

    The default implementation always returns false.

    Parameters

    Returns boolean

createTranslateHandle

  • Creates the shape translation handle.

    This is a handle that allows translation (moving) of an entire shape / feature.

    Parameters

    • context: EditContext

      The context to retrieve the shape translate handle for

    Returns EditHandle | null

getCreateHandle

  • Returns a handle that is used to create the given object.

    Parameters

    Returns EditHandle | null

    an editing handle that is used to initialize the state of the object being created.

getEditHandles

  • This method is called by EditController to retrieve the handles for editing.

    For example, point list translation/insertion/deletion handles, handles to modify a circles center and radius,... By default, all editors include a shape translation handle.

    This is also used for creation, when the "create-by-template" approach is used to create new shapes.

    Parameters

    • context: EditContext

      The context to retrieve the handles for.

    Returns EditHandle[]

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method