MacroDirectory

MacroDirectory

The directory, not displayed in the sidebar, which organizes and displays world-level Macro documents.

Constructor

new MacroDirectory()

See:
  • Macros The WorldCollection of Macro Documents
  • Macro The Macro Document
  • MacroConfig The Macro Configuration Sheet

Extends

Members

_original :SidebarTab

Overrides:

Denote whether or not this is the original version of the sidebar tab, or a pop-out variant

Type:

(protected) _popout :SidebarTab

Overrides:

A reference to the pop-out variant of this SidebarTab, if one exists

Type:

documentName :string

Overrides:

A reference to the named Document type that this Sidebar Directory instance displays

Type:
  • string

documentPartial :string

Overrides:

The path to the template partial which renders a single Document within this directory

Type:
  • string

documents :Array.<Document>

Overrides:

References to the set of Documents which are displayed in the Sidebar

Type:

folderPartial :string

Overrides:

The path to the template partial which renders a single Folder within this directory

Type:
  • string

folders :Array.<Folder>

Overrides:

Reference the set of Folders which exist in this Sidebar

Type:

tabName :string

Overrides:

The base name of this sidebar tab

Type:
  • string

Methods

_canDragStart()

Inherited From:

_contextMenu()

Inherited From:

(protected) _getEntryContextOptions() → {Array.<object>}

Overrides:

Get the set of ContextMenu options which should be used for Documents in a SidebarDirectory

Returns:

The Array of context options passed to the ContextMenu instance

Type
Array.<object>

(protected) _getFolderContextOptions() → {Array.<object>}

Overrides:

Get the set of ContextMenu options which should be used for Folders in a SidebarDirectory

Returns:

The Array of context options passed to the ContextMenu instance

Type
Array.<object>

(async, protected) _handleDroppedDocument(target, data)

Overrides:

Handle Document data being dropped into the directory.

Parameters:
Name Type Description
target HTMLElement

The target element

data Object

The data being dropped

(async, protected) _handleDroppedFolder(target, data)

Overrides:

Handle Folder data being dropped into the directory.

Parameters:
Name Type Description
target HTMLElement

The target element

data Object

The data being dropped

(protected) _onClickDocumentName(event)

Overrides:

Handle clicking on a Document name in the Sidebar directory

Parameters:
Name Type Description
event Event

The originating click event

(async, protected) _onCreateDocument(event)

Overrides:

Handle new Document creation request

Parameters:
Name Type Description
event MouseEvent

The originating button click event

(protected) _onCreateFolder(event)

Overrides:

Create a new Folder in this SidebarDirectory

Parameters:
Name Type Description
event MouseEvent

The originating button click event

_onDragHighlight(event)

Overrides:

Highlight folders as drop targets when a drag event enters or exits their area

Parameters:
Name Type Description
event DragEvent

The DragEvent which is in progress

_onDragStart()

Inherited From:

_onDrop()

Inherited From:

_onLazyLoadImage(entries, observer)

Overrides:

Handle lazy loading for sidebar images to only load them once they become observed

Parameters:
Name Type Description
entries Array.<HTMLElement>

The entries which are now observed

observer IntersectionObserver

The intersection observer instance

_onSearchFilter()

Inherited From:

(protected) _toggleFolder(event)

Overrides:

Handle toggling the collapsed or expanded state of a folder within the directory tab

Parameters:
Name Type Description
event MouseEvent

The originating click event

activate()

Overrides:

Activate this SidebarTab, switching focus to it

activateListeners()

Overrides:

Activate event listeners triggered within the Actor Directory HTML

collapseAll()

Overrides:

Collapse all subfolders in this directory

createPopout() → {SidebarTab}

Overrides:

Create a second instance of this SidebarTab class which represents a singleton popped-out container

Returns:

The popped out sidebar tab instance

Type
SidebarTab

(async) getData()

Inherited From:

initialize()

Overrides:

Initialize the content of the directory by categorizing folders and documents into a hierarchical tree structure.

renderPopout()

Overrides:

Render the SidebarTab as a pop-out container