@leafer/interface 1.12.0 → 1.12.2
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.
package/package.json
CHANGED
package/src/app/ILeafer.ts
CHANGED
package/src/display/ILeaf.ts
CHANGED
|
@@ -74,7 +74,7 @@ export interface IConstraint {
|
|
|
74
74
|
|
|
75
75
|
export type IConstraintType = 'from' | 'center' | 'to' | 'from-to' | 'scale'
|
|
76
76
|
|
|
77
|
-
export type IScaleFixed = boolean | 'zoom-in' // 缩放时是否固定原有比例,zoom-in表示仅在放大时固定比例(缩小时仍跟随缩小)
|
|
77
|
+
export type IScaleFixed = boolean | 'zoom-in' | number // 缩放时是否固定原有比例,zoom-in表示仅在放大时固定比例(缩小时仍跟随缩小)
|
|
78
78
|
|
|
79
79
|
export type IHitType =
|
|
80
80
|
| 'path'
|
|
@@ -248,6 +248,7 @@ export interface ILeafAttrData {
|
|
|
248
248
|
height?: INumber
|
|
249
249
|
scaleX?: INumber
|
|
250
250
|
scaleY?: INumber
|
|
251
|
+
scaleFixed?: IScaleFixed
|
|
251
252
|
rotation?: INumber
|
|
252
253
|
skewX?: INumber
|
|
253
254
|
skewY?: INumber
|
|
@@ -355,6 +356,7 @@ export interface ILeafComputedData {
|
|
|
355
356
|
height?: number
|
|
356
357
|
scaleX?: number
|
|
357
358
|
scaleY?: number
|
|
359
|
+
scaleFixed?: IScaleFixed
|
|
358
360
|
rotation?: number
|
|
359
361
|
skewX?: number
|
|
360
362
|
skewY?: number
|
|
@@ -679,8 +681,8 @@ export interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix,
|
|
|
679
681
|
|
|
680
682
|
// ILeafHit ->
|
|
681
683
|
hit(world: IPointData, hitRadius?: number): boolean
|
|
682
|
-
__hitWorld(point: IRadiusPointData): boolean
|
|
683
|
-
__hit(local: IRadiusPointData): boolean
|
|
684
|
+
__hitWorld(point: IRadiusPointData, forceHitFill?: boolean): boolean
|
|
685
|
+
__hit(local: IRadiusPointData, forceHitFill?: boolean): boolean
|
|
684
686
|
__hitFill(inner: IRadiusPointData): boolean
|
|
685
687
|
__hitStroke(inner: IRadiusPointData, strokeWidth: number): boolean
|
|
686
688
|
__hitPixel(inner: IRadiusPointData): boolean
|
package/src/event/IUIEvent.ts
CHANGED
|
@@ -23,6 +23,8 @@ export interface IUIEvent extends IEvent {
|
|
|
23
23
|
path?: ILeafList
|
|
24
24
|
throughPath?: ILeafList // 穿透path,不受层级影响,从上到下只要碰撞到区域就算,一般点击的时候
|
|
25
25
|
|
|
26
|
+
time?: number
|
|
27
|
+
|
|
26
28
|
isHoldKeys?(shortcutKeys?: IShortcutKeysCheck | IShortcutKeys): boolean
|
|
27
29
|
|
|
28
30
|
getBoxPoint?(relative?: ILeaf): IPointData
|
|
@@ -77,6 +77,7 @@ export interface IInteraction extends IControl {
|
|
|
77
77
|
isFocus(leaf: ILeaf): boolean
|
|
78
78
|
|
|
79
79
|
cancelHover(): void
|
|
80
|
+
stopDragAnimate(): void
|
|
80
81
|
|
|
81
82
|
updateDownData(data?: IPointerEvent, options?: IPickOptions, merge?: boolean): void
|
|
82
83
|
updateHoverData(data: IPointerEvent): void
|
package/types/index.d.ts
CHANGED
|
@@ -1395,6 +1395,7 @@ interface IAnimateOptions {
|
|
|
1395
1395
|
loopDelay?: number;
|
|
1396
1396
|
speed?: number;
|
|
1397
1397
|
join?: boolean;
|
|
1398
|
+
jump?: boolean;
|
|
1398
1399
|
autoplay?: boolean;
|
|
1399
1400
|
attrs?: string[];
|
|
1400
1401
|
event?: IAnimateEvents;
|
|
@@ -1469,7 +1470,7 @@ interface IConstraint {
|
|
|
1469
1470
|
y: IConstraintType;
|
|
1470
1471
|
}
|
|
1471
1472
|
type IConstraintType = 'from' | 'center' | 'to' | 'from-to' | 'scale';
|
|
1472
|
-
type IScaleFixed = boolean | 'zoom-in';
|
|
1473
|
+
type IScaleFixed = boolean | 'zoom-in' | number;
|
|
1473
1474
|
type IHitType = 'path' | 'pixel' | 'all' | 'none';
|
|
1474
1475
|
type IMaskType = 'path' | 'pixel' | 'grayscale' | 'clipping' | 'clipping-path';
|
|
1475
1476
|
type IEraserType = 'path' | 'pixel';
|
|
@@ -1517,6 +1518,7 @@ interface ILeafAttrData {
|
|
|
1517
1518
|
height?: INumber;
|
|
1518
1519
|
scaleX?: INumber;
|
|
1519
1520
|
scaleY?: INumber;
|
|
1521
|
+
scaleFixed?: IScaleFixed;
|
|
1520
1522
|
rotation?: INumber;
|
|
1521
1523
|
skewX?: INumber;
|
|
1522
1524
|
skewY?: INumber;
|
|
@@ -1594,6 +1596,7 @@ interface ILeafComputedData {
|
|
|
1594
1596
|
height?: number;
|
|
1595
1597
|
scaleX?: number;
|
|
1596
1598
|
scaleY?: number;
|
|
1599
|
+
scaleFixed?: IScaleFixed;
|
|
1597
1600
|
rotation?: number;
|
|
1598
1601
|
skewX?: number;
|
|
1599
1602
|
skewY?: number;
|
|
@@ -1823,8 +1826,8 @@ interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix, ILeafDa
|
|
|
1823
1826
|
resizeWidth(width: number): void;
|
|
1824
1827
|
resizeHeight(height: number): void;
|
|
1825
1828
|
hit(world: IPointData, hitRadius?: number): boolean;
|
|
1826
|
-
__hitWorld(point: IRadiusPointData): boolean;
|
|
1827
|
-
__hit(local: IRadiusPointData): boolean;
|
|
1829
|
+
__hitWorld(point: IRadiusPointData, forceHitFill?: boolean): boolean;
|
|
1830
|
+
__hit(local: IRadiusPointData, forceHitFill?: boolean): boolean;
|
|
1828
1831
|
__hitFill(inner: IRadiusPointData): boolean;
|
|
1829
1832
|
__hitStroke(inner: IRadiusPointData, strokeWidth: number): boolean;
|
|
1830
1833
|
__hitPixel(inner: IRadiusPointData): boolean;
|
|
@@ -2096,6 +2099,7 @@ interface IUIEvent extends IEvent {
|
|
|
2096
2099
|
buttons?: number;
|
|
2097
2100
|
path?: ILeafList;
|
|
2098
2101
|
throughPath?: ILeafList;
|
|
2102
|
+
time?: number;
|
|
2099
2103
|
isHoldKeys?(shortcutKeys?: IShortcutKeysCheck | IShortcutKeys): boolean;
|
|
2100
2104
|
getBoxPoint?(relative?: ILeaf): IPointData;
|
|
2101
2105
|
getInnerPoint?(relative?: ILeaf): IPointData;
|
|
@@ -2223,6 +2227,7 @@ interface IInteraction extends IControl {
|
|
|
2223
2227
|
isHover(leaf: ILeaf): boolean;
|
|
2224
2228
|
isFocus(leaf: ILeaf): boolean;
|
|
2225
2229
|
cancelHover(): void;
|
|
2230
|
+
stopDragAnimate(): void;
|
|
2226
2231
|
updateDownData(data?: IPointerEvent, options?: IPickOptions, merge?: boolean): void;
|
|
2227
2232
|
updateHoverData(data: IPointerEvent): void;
|
|
2228
2233
|
updateCursor(hoverData?: IPointerEvent): void;
|
|
@@ -2339,7 +2344,7 @@ interface ILeaferAttrData {
|
|
|
2339
2344
|
viewCompleted: boolean;
|
|
2340
2345
|
layoutLocked: boolean;
|
|
2341
2346
|
transforming: boolean;
|
|
2342
|
-
view: unknown;
|
|
2347
|
+
readonly view: unknown;
|
|
2343
2348
|
canvas: ILeaferCanvas;
|
|
2344
2349
|
renderer: IRenderer;
|
|
2345
2350
|
watcher: IWatcher;
|