@ngroznykh/papirus 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Bounds, Point } from '../types';
|
|
2
|
+
export type OutlineSide = 'top' | 'right' | 'bottom' | 'left';
|
|
3
|
+
/** World offset of the outline connect handle from the contour at zoom 1. */
|
|
4
|
+
export declare const OUTLINE_CONNECT_HANDLE_OFFSET = 0;
|
|
5
|
+
/** Extra world distance (zoom 1) before the handle may jump to another side. */
|
|
6
|
+
export declare const OUTLINE_CONNECT_HANDLE_HYSTERESIS = 8;
|
|
7
|
+
export declare function closestPointOnRectSide(bounds: Bounds, side: OutlineSide, pointer: Point): Point;
|
|
8
|
+
export declare function closestPointOnRectOutline(bounds: Bounds, pointer: Point): {
|
|
9
|
+
side: OutlineSide;
|
|
10
|
+
point: Point;
|
|
11
|
+
};
|
|
12
|
+
export declare function nearestOutlineSide(bounds: Bounds, point: Point): OutlineSide;
|
|
13
|
+
export declare function getOutlineConnectHandle(bounds: Bounds, pointer: Point, offset: number, prevSide?: OutlineSide | null, hysteresis?: number): {
|
|
14
|
+
side: OutlineSide;
|
|
15
|
+
attach: Point;
|
|
16
|
+
handle: Point;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=outlineConnectHandle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outlineConnectHandle.d.ts","sourceRoot":"","sources":["../../src/utils/outlineConnectHandle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE9D,6EAA6E;AAC7E,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAE/C,gFAAgF;AAChF,eAAO,MAAM,iCAAiC,IAAI,CAAC;AAUnD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,GAAG,KAAK,CAY/F;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,KAAK,GACb;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAgBrC;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,WAAW,CAE5E;AAED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,KAAK,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,WAAW,GAAG,IAAI,EAC7B,UAAU,GAAE,MAA0C,GACrD;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,KAAK,CAAA;CAAE,CA0BrD"}
|