UNPKG

@zxh19890103/wik

Version:

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

74 lines (73 loc) 2.12 kB
import L from 'leaflet'; import { WikDraggable } from './Draggable.class'; import { WikMap } from './Map.class'; import { ReactiveLayer } from '../../mixins'; declare const SVGOverlay_base: import("../../interfaces").Constructor<L.SVGOverlay & ReactiveLayer>; export declare class SVGOverlay extends SVGOverlay_base { private _size; /** * 修改前的 svg 尺寸 */ __preSize: L.Point; get size(): L.Point; set size(val: L.PointExpression); /** * svg 的短边 */ get svgMinLength(): number; constructor(el: string | SVGElement, position: L.LatLngExpression, sizeX: number, sizeY: number, options?: L.ImageOverlayOptions); /** * 与属性 size 不同的是,它会触发渲染 */ setSize(x: number | L.Point, y?: number): void; computesSvgBoxRadius(): number; /** * includes:viewbox/style/root G transform * @param scale means * @returns */ getSVGLayout(scale?: number): { gAttrs: { transform: string; }; styleAttrs: { x: number; y: number; width: number; height: number; cx: number; cy: number; r: number; fill: string; stroke: string; }; viewbox: string; }; /** * svg 内可见物体(角度为 0 的时候)的位置 * @param r 为 svg 的窗口尺寸 */ computesVisibleObjectOffset(boxRadius: number): number[]; onRender(): void; /** * * @param scale We use this to scale * @param _r We use this to compute the translation offset and rotation origin. If _r not provided, we call computesSvgBoxRadius. * @returns */ getVisibleObjectTransformStyle(scale?: number, _r?: number): string; getSvgViewboxProp(): string; setScale(s: number): void; } export interface SVGOverlay { _map: WikMap; /** * world bounds. */ _bounds: L.LatLngBounds; _fromBoundsMark: L.Rectangle; _image: HTMLElement; dragging: WikDraggable; redraw: () => void; } export {};