UNPKG

@zxh19890103/wik

Version:

The world-class JavaScript library for building large-scale digital warehouse both on 2D and 3D.

37 lines (36 loc) 1.27 kB
import React from 'react'; import { WikMap } from './Map.class'; import { SvgFunctionComponent } from './SVGComponentFactory'; interface SVG { id: string; component: SvgFunctionComponent; data?: any; style?: React.CSSProperties; model?: any; } type AfterRenderPromiseSettleFn = (val?: HTMLElement) => void; /** * 用于渲染 svg 组件的服务 */ declare class ReactSVGOverlayAppServer { map: WikMap; pane: string; isRunning: boolean; isMounted: boolean; paneElement: HTMLDivElement; leafletPanesElement: HTMLDivElement; svgToAdd: SVG[]; settleAfterRenderPromisesQueue: Map<string, AfterRenderPromiseSettleFn>; addComponent: (component: SvgFunctionComponent, id: string, model: any, data: any, style?: any) => Promise<HTMLElement>; updateComponent: (id: string, data: any, style?: any) => Promise<HTMLElement>; removeComponent: (id: string) => void; clearComponents: () => void; getSVGElement(id: string): HTMLDivElement; bootstrap(map: WikMap, pane: string): this; private preparePaneElement; teardown(): void; } export declare const ReactSVGOverlayApp: React.MemoExoticComponent<(props: { server: ReactSVGOverlayAppServer; }) => JSX.Element>; export { ReactSVGOverlayAppServer };