@leafer/interface 1.0.10 → 1.1.0
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 +1 -1
- package/src/display/ILeaf.ts +12 -4
- package/types/index.d.ts +9 -4
package/package.json
CHANGED
package/src/display/ILeaf.ts
CHANGED
|
@@ -287,6 +287,8 @@ export interface ILeafAttrData {
|
|
|
287
287
|
cursor?: ICursorType | ICursorType[]
|
|
288
288
|
|
|
289
289
|
motionPath?: IBoolean
|
|
290
|
+
motionPrecision?: INumber
|
|
291
|
+
|
|
290
292
|
motion?: INumber | IUnitData
|
|
291
293
|
motionRotation?: INumber | IBoolean
|
|
292
294
|
|
|
@@ -385,6 +387,8 @@ export interface ILeafComputedData {
|
|
|
385
387
|
cursor?: ICursorType | ICursorType[]
|
|
386
388
|
|
|
387
389
|
motionPath?: boolean
|
|
390
|
+
motionPrecision?: number
|
|
391
|
+
|
|
388
392
|
motion?: number | IUnitData
|
|
389
393
|
motionRotation?: number | boolean
|
|
390
394
|
|
|
@@ -415,6 +419,7 @@ export interface ILeafComputedData {
|
|
|
415
419
|
__pathInputed?: number // 是否为输入path, 0:否,1:是,2:永远是(不自动检测)
|
|
416
420
|
__pathForRender?: IPathCommandData
|
|
417
421
|
__path2DForRender?: IPath2D
|
|
422
|
+
__pathForArrow?: IPathCommandData
|
|
418
423
|
__pathForMotion?: IMotionPathData
|
|
419
424
|
}
|
|
420
425
|
|
|
@@ -510,7 +515,7 @@ export interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix,
|
|
|
510
515
|
|
|
511
516
|
__bindLeafer(leafer: ILeaferBase | null): void
|
|
512
517
|
|
|
513
|
-
set(data: IObject,
|
|
518
|
+
set(data: IObject, transition?: any): void
|
|
514
519
|
get(name?: string | string[] | IObject): ILeafInputData | IValue
|
|
515
520
|
setAttr(name: string, value: any): void
|
|
516
521
|
getAttr(name: string): any
|
|
@@ -521,6 +526,9 @@ export interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix,
|
|
|
521
526
|
toSVG(): string
|
|
522
527
|
__SVG(data: IObject): void
|
|
523
528
|
toHTML(): string
|
|
529
|
+
clone?(data?: ILeafInputData): ILeaf
|
|
530
|
+
|
|
531
|
+
animate?(_keyframe?: any, _options?: any, _type?: any, _isTemp?: boolean): any
|
|
524
532
|
|
|
525
533
|
// ILeafData ->
|
|
526
534
|
__setAttr(attrName: string, newValue: IValue, checkFiniteNumber?: boolean): boolean
|
|
@@ -605,15 +613,15 @@ export interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix,
|
|
|
605
613
|
// transform
|
|
606
614
|
setTransform(transform?: IMatrixData, resize?: boolean): void
|
|
607
615
|
transform(transform?: IMatrixData, resize?: boolean): void
|
|
608
|
-
move(x: number | IPointData, y?: number): void
|
|
616
|
+
move(x: number | IPointData, y?: number, transition?: any): void
|
|
609
617
|
|
|
610
|
-
moveInner(x: number | IPointData, y?: number): void
|
|
618
|
+
moveInner(x: number | IPointData, y?: number, transition?: any): void
|
|
611
619
|
scaleOf(origin: IPointData | IAlign, scaleX: number, scaleY?: number, resize?: boolean): void
|
|
612
620
|
rotateOf(origin: IPointData | IAlign, rotation: number): void
|
|
613
621
|
skewOf(origin: IPointData | IAlign, skewX: number, skewY?: number, resize?: boolean): void
|
|
614
622
|
|
|
615
623
|
transformWorld(worldTransform?: IMatrixData, resize?: boolean): void
|
|
616
|
-
moveWorld(x: number | IPointData, y?: number): void
|
|
624
|
+
moveWorld(x: number | IPointData, y?: number, transition?: any): void
|
|
617
625
|
scaleOfWorld(worldOrigin: IPointData, scaleX: number, scaleY?: number, resize?: boolean): void
|
|
618
626
|
rotateOfWorld(worldOrigin: IPointData, rotation: number): void
|
|
619
627
|
skewOfWorld(worldOrigin: IPointData, skewX: number, skewY?: number, resize?: boolean): void
|
package/types/index.d.ts
CHANGED
|
@@ -1398,6 +1398,7 @@ interface ILeafAttrData {
|
|
|
1398
1398
|
button?: IBoolean;
|
|
1399
1399
|
cursor?: ICursorType | ICursorType[];
|
|
1400
1400
|
motionPath?: IBoolean;
|
|
1401
|
+
motionPrecision?: INumber;
|
|
1401
1402
|
motion?: INumber | IUnitData;
|
|
1402
1403
|
motionRotation?: INumber | IBoolean;
|
|
1403
1404
|
normalStyle?: IObject;
|
|
@@ -1468,6 +1469,7 @@ interface ILeafComputedData {
|
|
|
1468
1469
|
button?: boolean;
|
|
1469
1470
|
cursor?: ICursorType | ICursorType[];
|
|
1470
1471
|
motionPath?: boolean;
|
|
1472
|
+
motionPrecision?: number;
|
|
1471
1473
|
motion?: number | IUnitData;
|
|
1472
1474
|
motionRotation?: number | boolean;
|
|
1473
1475
|
normalStyle?: IObject;
|
|
@@ -1488,6 +1490,7 @@ interface ILeafComputedData {
|
|
|
1488
1490
|
__pathInputed?: number;
|
|
1489
1491
|
__pathForRender?: IPathCommandData;
|
|
1490
1492
|
__path2DForRender?: IPath2D;
|
|
1493
|
+
__pathForArrow?: IPathCommandData;
|
|
1491
1494
|
__pathForMotion?: IMotionPathData;
|
|
1492
1495
|
}
|
|
1493
1496
|
interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix, ILeafDataProxy, ILeafInputData, IEventer {
|
|
@@ -1554,7 +1557,7 @@ interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix, ILeafDa
|
|
|
1554
1557
|
nextRender(item: IFunction, bind?: IObject, off?: 'off'): void;
|
|
1555
1558
|
removeNextRender(item: IFunction): void;
|
|
1556
1559
|
__bindLeafer(leafer: ILeaferBase | null): void;
|
|
1557
|
-
set(data: IObject,
|
|
1560
|
+
set(data: IObject, transition?: any): void;
|
|
1558
1561
|
get(name?: string | string[] | IObject): ILeafInputData | IValue;
|
|
1559
1562
|
setAttr(name: string, value: any): void;
|
|
1560
1563
|
getAttr(name: string): any;
|
|
@@ -1564,6 +1567,8 @@ interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix, ILeafDa
|
|
|
1564
1567
|
toSVG(): string;
|
|
1565
1568
|
__SVG(data: IObject): void;
|
|
1566
1569
|
toHTML(): string;
|
|
1570
|
+
clone?(data?: ILeafInputData): ILeaf;
|
|
1571
|
+
animate?(_keyframe?: any, _options?: any, _type?: any, _isTemp?: boolean): any;
|
|
1567
1572
|
__setAttr(attrName: string, newValue: IValue, checkFiniteNumber?: boolean): boolean;
|
|
1568
1573
|
__getAttr(attrName: string): IValue;
|
|
1569
1574
|
setProxyAttr(name: string, newValue: IValue): void;
|
|
@@ -1622,13 +1627,13 @@ interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix, ILeafDa
|
|
|
1622
1627
|
getWorldPointByPage(page: IPointData, relative?: ILeaf, distance?: boolean, change?: boolean): IPointData;
|
|
1623
1628
|
setTransform(transform?: IMatrixData, resize?: boolean): void;
|
|
1624
1629
|
transform(transform?: IMatrixData, resize?: boolean): void;
|
|
1625
|
-
move(x: number | IPointData, y?: number): void;
|
|
1626
|
-
moveInner(x: number | IPointData, y?: number): void;
|
|
1630
|
+
move(x: number | IPointData, y?: number, transition?: any): void;
|
|
1631
|
+
moveInner(x: number | IPointData, y?: number, transition?: any): void;
|
|
1627
1632
|
scaleOf(origin: IPointData | IAlign, scaleX: number, scaleY?: number, resize?: boolean): void;
|
|
1628
1633
|
rotateOf(origin: IPointData | IAlign, rotation: number): void;
|
|
1629
1634
|
skewOf(origin: IPointData | IAlign, skewX: number, skewY?: number, resize?: boolean): void;
|
|
1630
1635
|
transformWorld(worldTransform?: IMatrixData, resize?: boolean): void;
|
|
1631
|
-
moveWorld(x: number | IPointData, y?: number): void;
|
|
1636
|
+
moveWorld(x: number | IPointData, y?: number, transition?: any): void;
|
|
1632
1637
|
scaleOfWorld(worldOrigin: IPointData, scaleX: number, scaleY?: number, resize?: boolean): void;
|
|
1633
1638
|
rotateOfWorld(worldOrigin: IPointData, rotation: number): void;
|
|
1634
1639
|
skewOfWorld(worldOrigin: IPointData, skewX: number, skewY?: number, resize?: boolean): void;
|