@glodon-aiot/react-components
Version:
aiot react components
41 lines (40 loc) • 1.37 kB
TypeScript
import { default as React, CSSProperties } from 'react';
import { ITrackPoint } from '..';
import { TrackMapActions, Transform } from '../TrackMap';
interface ImageMapProps {
url: string;
points?: ITrackPoint[];
pointSize?: number;
direction?: number;
activePointId?: string;
lineStyle?: CSSProperties;
pointStyle?: CSSProperties;
directionStyle?: CSSProperties;
transform?: Transform;
trackEditable?: boolean;
trackEditing?: boolean;
keepRatio?: boolean;
actions?: TrackMapActions;
onTrackEditingChange?: (editing: boolean) => void;
onPointClick?: (val: ITrackPoint) => void;
passes?: any;
activePassId?: number;
passStyle?: CSSProperties;
activePassStyle?: CSSProperties;
marks?: any;
draggable?: boolean;
zoomable?: boolean;
zoomStep?: number;
offsetEdge?: number[];
zoomMax?: number;
zoomMin?: number;
onImageLoad?: (img: HTMLImageElement) => void;
onTransform?: (transform: Transform, pointsEl?: SVGCircleElement[], canvas?: SVGSVGElement) => void;
onPointsChange?: (points: ITrackPoint[]) => void;
}
export interface ImageMapRefProps {
zoomIn: (zoom?: number) => void;
zoomOut: (zoom?: number) => void;
}
declare const ImageMap: React.ForwardRefExoticComponent<ImageMapProps & React.RefAttributes<ImageMapRefProps>>;
export { ImageMap };