Options
All
  • Public
  • Public/Protected
  • All
Menu

An extension of MapTool that implements ToolBase's enabled: Observable<boolean> by calling the command's canExecute with no arguments. This is playing fast and loose with what 'canExecute' means because of course the command can't actually execute without the geometry input. However we don't have that geometry until after the tool executes so it's a chicken and egg problem. This functionality is not in MapTool because not all Commands do (should?) follow this convention.

Hierarchy

Implements

Index

Constructors

constructor

Properties

_drawIsActive

_drawIsActive: boolean

The activate state of the Esri drawing surface. The Esri drawing surface does not provide an indication of whether it is active or not. We'll keep track of this state ourselves so that we don't call deactivate unnecessarily.

_drawObject

_drawObject: Draw

The Esri drawing surface.

Protected _inputMethodChangeHandle

_inputMethodChangeHandle: RemovableHandle

app

The {@link geocortex.essentialsHtmlViewer.ViewerApplication} that this tool instance belongs to.

closeTitle

closeTitle: string

Optional title for the close tool UI element. Defaults to "Deactivate Tool".

command

command: string

The command name associated with this tool.

type

{string}

drawMode

drawMode: string

The draw mode of this tool.

enabled

enabled: Observable<boolean>

iconUri

iconUri: string

Optional URI of the icon to display with the status.

isActive

isActive: boolean

Whether this tool is active.

type

{boolean}

isSticky

isSticky: boolean

Whether this tool is sticky.

type

{boolean}

keyboardStatusText

keyboardStatusText: string

Optional, alternate status text to display for keyboard users. Can be i18ned.

libraryId

libraryId: string

Library to look up i18n string keys from. Required to display i18n strings.

name

name: string

The name of this tool.

type

{string}

statusClass

statusClass: string

Optional CSS class for the status displayed for this tool.

statusText

statusText: string

Status text to display while the tool is active. Can be i18ned.

Methods

onActivated

  • onActivated(): boolean

onDeactivated

  • onDeactivated(): void

onDrawEnd

  • onDrawEnd(geometry: Geometry | object): void
  • Called when drawing completes. Now handling 'onDrawComplete' instead of deprecated 'onDrawEnd', though still checking for both payloads

    Parameters

    • geometry: Geometry | object

    Returns void

onInputMethodChange

  • onInputMethodChange(result: object): void
  • Called when the input method (e.g. keyboard, mouse) for the drawing component has changed.

    Parameters

    • result: object
      • newMethod: string
      • previousMethod: string

    Returns void

onMapMouseDown

  • onMapMouseDown(evt: MouseEvent): void
  • Parameters

    • evt: MouseEvent

    Returns void

onMapMouseHover

setActive

  • setActive(active: boolean): void
  • Sets the active state of the tool.

    Parameters

    • active: boolean

      The desired active state of the tool.

    Returns void