Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

Readonly activeTool

activeTool: "polygon" | "point" | "polyline" | "circle" | "rectangle" | "move" | "transform" | "reshape" | "rectangle-selection" | "lasso-selection"

When creating new graphics (for example after create() has been called), this property reflects the create tool being used.

Read more...

availableCreateTools

availableCreateTools: string[]

Property controlling the visibility and order of create tool buttons.

Read more...

container

container: string | HTMLElement

The ID or node representing the DOM element containing the widget.

Read more...

Readonly createGraphic

createGraphic: Graphic

The graphic that is being created.

Read more...

creationMode

creationMode: "update" | "single" | "continuous"

Defines the default behavior once the create operation is completed.

Read more...

declaredClass

declaredClass: string

defaultCreateOptions

defaultCreateOptions: SketchDefaultCreateOptions

Default create options set for the Sketch widget.

Read more...

defaultUpdateOptions

defaultUpdateOptions: SketchDefaultUpdateOptions

Default update options set for the Sketch widget.

Read more...

destroyed

destroyed: boolean

iconClass

iconClass: string

The Sketch widget's default CSS icon class.

Read more...

id

id: string

The unique ID assigned to the widget when the widget is created.

Read more...

initialized

initialized: boolean

label

label: string

The widget's label.

Read more...

layer

The GraphicsLayer associated with the Sketch widget.

Read more...

layout

layout: "horizontal" | "vertical"

Determines the layout/orientation of the Sketch widget.

Read more...

snappingOptions

snappingOptions: SnappingOptions

The SnappingOptions for sketching.

Read more...

Readonly state

state: "disabled" | "ready" | "active"

The Sketch widget's state.

Read more...

Readonly updateGraphics

updateGraphics: Collection<Graphic>

An array of graphics that are being updated by the Sketch widget.

Read more...

view

A reference to the MapView or SceneView.

Read more...

viewModel

viewModel: SketchViewModel

The view model for the Sketch widget.

Read more...

visible

visible: boolean

Indicates whether the widget is visible.

Read more...

visibleElements

visibleElements: SketchVisibleElements

The visible elements that are displayed within the widget.

Read more...

Methods

Protected _get

  • _get(propertyName: string): any
  • _get<T>(propertyName: string): T
  • Parameters

    • propertyName: string

    Returns any

  • Type parameters

    • T

    Parameters

    • propertyName: string

    Returns T

Protected _set

  • _set<T>(propertyName: string, value: T): Sketch
  • Type parameters

    • T

    Parameters

    • propertyName: string
    • value: T

    Returns Sketch

cancel

  • cancel(): void
  • Cancels the active operation and fires the create or update event.

    Read more...

    Returns void

classes

  • classes(...classNames: any[]): string
  • A utility method used for building the value for a widget's class property.

    Read more...

    Parameters

    • Rest ...classNames: any[]

    Returns string

complete

  • complete(): void
  • Completes the active operation and fires the create or update event and changes the event's state to complete.

    Read more...

    Returns void

create

  • Create a graphic with the geometry specified in the tool parameter.

    Read more...

    Parameters

    Returns void

delete

  • delete(): void
  • Deletes the selected graphics used in the update workflow.

    Read more...

    Returns void

destroy

  • destroy(): void
  • Destroys the widget instance.

    Read more...

    Returns void

emit

  • emit(type: string, event?: any): boolean
  • Emits an event on the instance.

    Read more...

    Parameters

    • type: string
    • Optional event: any

    Returns boolean

get

  • get<T>(propertyName: string): T
  • get(propertyName: string): any
  • Type parameters

    • T

    Parameters

    • propertyName: string

    Returns T

  • Parameters

    • propertyName: string

    Returns any

hasEventListener

  • hasEventListener(type: string): boolean
  • Indicates whether there is an event listener on the instance that matches the provided event name.

    Read more...

    Parameters

    • type: string

    Returns boolean

isFulfilled

  • isFulfilled(): boolean
  • isFulfilled() may be used to verify if creating an instance of the class is fulfilled (either resolved or rejected).

    Read more...

    Returns boolean

isRejected

  • isRejected(): boolean
  • isRejected() may be used to verify if creating an instance of the class is rejected.

    Read more...

    Returns boolean

isResolved

  • isResolved(): boolean
  • isResolved() may be used to verify if creating an instance of the class is resolved.

    Read more...

    Returns boolean

Protected notifyChange

  • notifyChange(propertyName: string): void
  • Parameters

    • propertyName: string

    Returns void

on

  • Parameters

    Returns IHandle

  • Parameters

    Returns IHandle

  • Parameters

    Returns IHandle

  • Parameters

    Returns IHandle

  • Parameters

    Returns IHandle

own

  • Widget teardown helper.

    Read more...

    Parameters

    Returns void

postInitialize

  • postInitialize(): void
  • This method is primarily used by developers when implementing custom widgets. Executes after widget is ready for rendering.

    Read more...

    Returns void

redo

  • redo(): void
  • Incrementally redo actions recorded in the stack.

    Read more...

    Returns void

render

  • render(): any
  • This method is primarily used by developers when implementing custom widgets. It must be implemented by subclasses for rendering.

    Read more...

    Returns any

renderNow

  • renderNow(): void
  • Renders widget to the DOM immediately.

    Read more...

    Returns void

scheduleRender

  • scheduleRender(): void
  • This method is primarily used by developers when implementing custom widgets. Schedules widget rendering.

    Read more...

    Returns void

set

  • Type parameters

    • T

    Parameters

    • propertyName: string
    • value: T

    Returns Sketch

  • Parameters

    Returns Sketch

undo

  • undo(): void
  • Incrementally undo actions recorded in the stack.

    Read more...

    Returns void

update

  • Initializes an update operation for the specified graphic(s) and fires update event.

    Read more...

    Parameters

    Returns Promise<void>

watch

  • Parameters

    • path: string | string[]
    • callback: WatchCallback
    • Optional sync: boolean

    Returns WatchHandle

when

  • when(callback?: Function, errback?: Function): Promise<any>
  • when() may be leveraged once an instance of the class is created.

    Read more...

    Parameters

    • Optional callback: Function
    • Optional errback: Function

    Returns Promise<any>

Generated using TypeDoc