@datalayer/core
Version:
**Datalayer Core**
39 lines (38 loc) • 1.11 kB
TypeScript
import { Component, CSSProperties } from 'react';
type ScreenCaptureProps = {
children: any;
onStartCapture?: () => void;
onEndCapture: (url: string) => void;
};
type ScreenCaptureState = {
on: boolean;
startX: number;
startY: number;
endX: number;
endY: number;
crossHairsTop: number;
crossHairsLeft: number;
isMouseDown: boolean;
windowWidth: number;
windowHeight: number;
borderWidth: number | string | CSSProperties;
cropPositionTop: number;
cropPositionLeft: number;
cropWidth: number;
cropHeigth: number;
imageURL: string;
};
export declare class ScreenCapture extends Component<ScreenCaptureProps, ScreenCaptureState> {
state: ScreenCaptureState;
handleWindowResize: () => void;
componentDidMount: () => void;
componentWillUnmount: () => void;
handStartCapture: () => void;
handleMouseMove: (e: any) => void;
handleMouseDown: (e: any) => void;
handleMouseUp: () => void;
handleClickTakeScreenShot: () => void;
renderChild: () => any;
render(): any;
}
export default ScreenCapture;