dbweb-common
Version:
用`yarn add dbweb-common`安装,不要忘记修改`angular.json`里的 `architect\build\options\assets`,加上
45 lines (44 loc) • 1.4 kB
TypeScript
import { Point } from '@angular/cdk/drag-drop/typings/drag-ref';
import { AfterViewInit, ElementRef, EventEmitter, OnInit } from '@angular/core';
declare type DargType = 'handle' | 'mask' | 'outside';
export interface MoveEvent {
startDragPoint: Point;
}
export declare class PortraitMaskComponent implements OnInit, AfterViewInit {
private elRef;
hostClass: boolean;
cx: number;
cy: number;
r: number;
maxR: number;
svgWidth: number;
svgHeight: number;
handleX: number;
handleY: number;
handleR: number;
cursor: string;
maskDistanceOffset: Point;
handleDistanceOffset: Point;
startDragPoint: Point;
dragType: DargType;
startDrag: EventEmitter<MouseEvent>;
dragging: EventEmitter<Point>;
maskChange: EventEmitter<ClientRect>;
svg: ElementRef;
handle: ElementRef;
maskCicle: ElementRef;
constructor(elRef: ElementRef<HTMLElement>);
toScreenPoint(x: any, y: any): Point;
toScreenDistance(val: number): number;
toSVGPoint(x: any, y: any): Point;
getLimitHandleCenterPostion(mousePoint: Point): Point;
mouseDown(event: MouseEvent): void;
ngOnInit(): void;
emitMaskRect(): void;
ngAfterViewInit(): void;
move(event: MouseEvent): void;
mouseUp(event: MouseEvent): void;
reset(): void;
private calcSize;
}
export {};