@expofp/floorplan
Version:
Interactive floor plan library for expos and events
31 lines • 1.51 kB
TypeScript
import type { MouseEventData } from "@expofp/renderer";
import type { RendererService } from "../../renderer";
import type { IconConfig } from "./types";
import type { LayerManager } from "./layerManager";
/**
* Manages `ImageDef` icons in the scene graph.
*
* Icons are keyed by `(name, key?)`. First `setIcon` creates the `ImageDef`
* and registers scale/roll handlers; subsequent calls mutate in place.
* Pass `config: null` to hide an icon without destroying it.
*/
export interface IconManager {
/** Place, update, or hide an icon. See {@link WayfindingRenderer.setIcon}. */
setIcon(name: string, config: IconConfig | null, key?: string | number): void;
/** Hide all icons matching the given name(s). */
clearIcons(names: string | ReadonlyArray<string>): void;
/** Hide every managed icon (used by `clearRoute`). */
hideAll(): void;
/** Unregister all scale/roll handlers and clear internal state. */
destroy(): void;
/** Pointer click handler — fires the first matching icon's `onClick`. */
handleClick(event: MouseEventData): void;
/** Pointer move handler — sets cursor to "pointer" when hovering a clickable icon. */
handleHover(event: MouseEventData): void;
}
/**
* Create an {@link IconManager} that places `ImageDef` icons into layers
* managed by the given {@link LayerManager}.
*/
export declare function createIconManager(layerManager: LayerManager, rendererService: RendererService): IconManager;
//# sourceMappingURL=iconManager.d.ts.map