@inweb/viewer-visualize
    Preparing search index...

    Interface IComponentsRegistry

    Define the viewer components registry interface.

    interface IComponentsRegistry {
        createComponent(name: string, viewer: IViewer): IComponent;
        getComponent(name: string): IComponentProvider;
        getComponents(): IComponentsMap;
        registerComponent(name: string, provider: IComponentProvider): void;
        registerComponentAlias(name: string, alias: string): void;
    }
    Index

    Methods

    • Creates the component denoted by the given name. Returns null if a component with given name not registered.

      Parameters

      • name: string

        Component name.

      • viewer: IViewer

        Viewer instance that wants to create the component.

      Returns IComponent

    • Returns the specified component or undefined when the component doesn't exists.

      Parameters

      • name: string

        Component name.

      Returns IComponentProvider

    • Returns a list of registered components.

      Returns IComponentsMap

    • Binds a component name to a component. Registering a component with an existing name twice overrides the existing component.

      Parameters

      • name: string

        Unique name for the component.

      • provider: IComponentProvider

        Component provider.

      Returns void

    • Registers an alias for a component.

      Parameters

      • name: string

        Unique name for the component.

      • alias: string

        Component alias string.

      Returns void