@zxh19890103/wik
Version:
The world-class JavaScript library for building large-scale digital warehouse both on 2D and 3D.
37 lines (36 loc) • 1.32 kB
TypeScript
import React from 'react';
import L, { Map } from 'leaflet';
import { SVGOverlay } from './SVGOverlay.class';
import { ReactSVGOverlayAppServer } from './ReactSVGOverlayApp';
import type { SvgFunctionComponent } from './SVGComponentFactory';
export type SvgStyleElementType = 'rect' | 'circle';
export declare class ReactSVGOverlay<D = any> extends SVGOverlay {
readonly svgServer: ReactSVGOverlayAppServer;
readonly svgC: SvgFunctionComponent;
readonly svgId: string;
svgStyleElement: SvgStyleElementType;
svgStyle: React.SVGAttributes<SVGRectElement>;
svgData: D;
private lastSvgStyle;
constructor(svgC: SvgFunctionComponent, svgServer: ReactSVGOverlayAppServer, sizeX: number, sizeY: number, options?: L.ImageOverlayOptions);
getLastSvgStyle(): React.SVGAttributes<SVGRectElement>;
onRender(): void;
updateSVG(): void;
/**
* @private
*/
doUpdateSVG(): void;
setSVGData(nextData?: D): void;
setSVGStyle(style: React.SVGAttributes<SVGRectElement>): void;
onAdd(map: Map): this;
onRemove(map: Map): this;
onTransform(): void;
}
export interface ReactSVGOverlay<D = any> {
_url: HTMLElement;
_initImage: () => void;
/**
* Layer 添加到 map 上之后回调,注意其与 onAdd 的不同
*/
onMounted(): void;
}