Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ToolRegistry

Index

Constructors

constructor

  • Initializes a new instance of the {@link geocortex.essentialsHtmlViewer.mapping.infrastructure.tools.ToolRegistry} class.

    class

    ToolRegistry provides safe, loosely-coupled access to tools.

    A ToolRegistry instance should always be used when referencing tools.

    constructs
    memberof

    geocortex.essentialsHtmlViewer.mapping.infrastructure.tools

    Parameters

    • app: ViewerApplication

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

    Returns ToolRegistry

Properties

tools

tools: object

An object map of all referenced tools.

Type declaration

Methods

Protected _setActiveToolCanExecute

  • _setActiveToolCanExecute(toolName: any): boolean
  • Parameters

    • toolName: any

    Returns boolean

clear

  • clear(): void
  • Unregisters all tools in the registry.

    Returns void

clearActiveTool

  • clearActiveTool(): void
  • Clears the active tool.

    Returns void

createTools

  • Creates and optionally registers the tools specified by a configuration block. Only named tools will be registered.

    Parameters

    • config: ToolConfig[]

      An array of tool configuration objects.

    • registerTools: boolean

      A flag indicating whether to register the tool with the registry.

    Returns ToolBase[]

    An array of tool objects.

getActiveTool

  • Gets the active tool.

    Returns ToolBase

register

  • Registers a tool. The tool must specify a name.

    Parameters

    Returns void

registerToolTypeForCommand

  • registerToolTypeForCommand(commandName: string, toolTypeName: string): void
  • Associates a command with a tool type, allowing tool subtypes to be created and invoked for certain tool commands.

    Parameters

    • commandName: string

      The name of the command to associate with a tool subtype.

    • toolTypeName: string

      The name of the tool type to associate with the command.

    Returns void

setActiveTool

  • setActiveTool(name: string): void
  • Sets the active tool.

    Parameters

    • name: string

      The name of the tool to activate.

    Returns void

tool

  • Fetches a tool by name.

    Parameters

    • name: string

      The name of the tool to fetch.

    Returns ToolBase

unregister

  • Unregisters a tool.

    Parameters

    • tool: ToolBase

      The tool to unregister.

    Returns void