Class: MapAssetsEditorView

MapAssetsEditorView()

Owns layer lists, editor selection, and the active asset form.

Screenshot

Constructor

new MapAssetsEditorView()

Since:
  • 2.41.0
Source:

Extends

  • Backbone.View

Members

className

Source:

events

Source:

Methods

addAsset(event) → {void}

Add a WMTS layer to the chosen group and select its label for editing.
Parameters:
Name Type Description
event Event The add button click
Source:
Returns:
Type
void

closeMoveControls(restoreFocusopt)

Hide Move controls and return them to the layers section.
Parameters:
Name Type Attributes Description
restoreFocus boolean <optional>
Whether to focus the old grip
Source:

createAssetItem(asset) → {MapAssetItemView}

Assign a missing ID as the layer enters the editor, then create its row and listen for editing, movement, and removal requests.
Parameters:
Name Type Description
asset MapAsset The layer represented by the row
Source:
Returns:
The rendered row
Type
MapAssetItemView

createLayerList(layers, host, categoryViewopt)

Create a stable layer list and a separate Add control.
Parameters:
Name Type Attributes Description
layers MapAssets The collection shown in this list
host HTMLElement The container for the list and Add control
categoryView MapAssetCategoryView <optional>
The category presentation
Source:

handleMoveFocusout(event)

Close Move controls when focus leaves them and their grip.
Parameters:
Name Type Description
event FocusEvent The focus change
Source:

handleMoveKeydown(event)

Close Move controls with Escape and focus the grip.
Parameters:
Name Type Description
event KeyboardEvent The key pressed in the controls or grip
Source:

initialize()

Initialize editor selection, Move controls, and the child views
Source:

moveAsset(asset, targetLayers, index) → {boolean}

Move a layer, show its destination, and announce its new position.
Parameters:
Name Type Description
asset MapAsset The layer to move
targetLayers MapAssets The destination collection
index number The layer's new index in that collection
Source:
Returns:
Whether the layer moved
Type
boolean

moveFromControls(event)

Move the active layer up, down, or to the chosen category.
Parameters:
Name Type Description
event Event The Move action's click
Source:

onClose()

Close Move controls and release drag handlers, views, and subscriptions.
Source:

remove()

Source:

removeAsset(asset) → {void}

Remove a layer and focus the next row, preceding row, or empty state.
Parameters:
Name Type Description
asset MapAsset The layer to remove
Source:
Returns:
Type
void

render() → {MapAssetsEditorView}

Create the layers workspace and subscribe to its existing collections.
Source:
Returns:
This view
Type
MapAssetsEditorView

renderList()

Sync rows while keeping their controls and the active form.
Source:

selectAsset(asset) → {void}

Select an asset for editing without changing runtime map selection.
Parameters:
Name Type Description
asset MapAsset | null The layer to edit, or null to clear selection
Source:
Returns:
Type
void

showMoveControls(asset, button)

Open or toggle Move controls for a layer without selecting it.
Parameters:
Name Type Description
asset MapAsset The layer to move
button HTMLButtonElement The layer's grip
Source:

showValidation() → {void}

Select the first invalid layer and delegate feedback to its form.
Source:
Returns:
Type
void