Skip to content

editor › Globals › MosaicElementLoader

Class: MosaicElementLoader

This class is an abstract class for loading the MosaicElementContainers for the ApplyMosaicOrnamentTool and the PolygonOrnamentDescriptors. The loading has to be implemented in different subclasses.

Hierarchy

  • MosaicElementLoader

↳ LocalMosaicElementLoader

Index

Properties

Methods

Properties

Static Protected gridMap

▪ gridMap: Map‹string, MosaicElementContainer› = new Map()

Defined in src/modules/kyub.core.plateOrnaments/src/MosaicElementOrnaments/MosaicElementLoader.ts:11


Static Protected nullMosaicElementContainerId

▪ nullMosaicElementContainerId: string = "null_grid"

Defined in src/modules/kyub.core.plateOrnaments/src/MosaicElementOrnaments/MosaicElementLoader.ts:8

Methods

Static Protected _loadMosaicElementContainer

▸ _loadMosaicElementContainer(id: string): Promise‹void›

Defined in src/modules/kyub.core.plateOrnaments/src/MosaicElementOrnaments/MosaicElementLoader.ts:39

Use this method to load and cache the grid types inside the gridMap.

Parameters:

Name Type
id string

Returns: Promise‹void›


Static getMosaicElementContainer

▸ getMosaicElementContainer(id: string): Promise‹MosaicElementContainer›

Defined in src/modules/kyub.core.plateOrnaments/src/MosaicElementOrnaments/MosaicElementLoader.ts:17

Parameters:

Name Type Description
id string id of the mosaicElementContainer

Returns: Promise‹MosaicElementContainer›

a promise of a MosaicElementContainer


Static getNullMosaicElementContainer

▸ getNullMosaicElementContainer(): MosaicElementContainer

Defined in src/modules/kyub.core.plateOrnaments/src/MosaicElementOrnaments/MosaicElementLoader.ts:32

Returns: MosaicElementContainer

a NullMosaicElementContainer providing the same interface as a MosaicElementContainer but adding no functionality. This means that we can use it as a default value in case no real MosaicElementContainer has been set.