@leafer/display 1.3.3 → 1.4.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.
- package/package.json +11 -11
- package/src/Leaf.ts +22 -22
- package/types/index.d.ts +13 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer/display",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "@leafer/display",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,17 +22,17 @@
|
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/math": "1.
|
|
26
|
-
"@leafer/data": "1.
|
|
27
|
-
"@leafer/layout": "1.
|
|
28
|
-
"@leafer/display-module": "1.
|
|
29
|
-
"@leafer/event": "1.
|
|
30
|
-
"@leafer/decorator": "1.
|
|
31
|
-
"@leafer/helper": "1.
|
|
32
|
-
"@leafer/debug": "1.
|
|
33
|
-
"@leafer/platform": "1.
|
|
25
|
+
"@leafer/math": "1.4.1",
|
|
26
|
+
"@leafer/data": "1.4.1",
|
|
27
|
+
"@leafer/layout": "1.4.1",
|
|
28
|
+
"@leafer/display-module": "1.4.1",
|
|
29
|
+
"@leafer/event": "1.4.1",
|
|
30
|
+
"@leafer/decorator": "1.4.1",
|
|
31
|
+
"@leafer/helper": "1.4.1",
|
|
32
|
+
"@leafer/debug": "1.4.1",
|
|
33
|
+
"@leafer/platform": "1.4.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@leafer/interface": "1.
|
|
36
|
+
"@leafer/interface": "1.4.1"
|
|
37
37
|
}
|
|
38
38
|
}
|
package/src/Leaf.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ILeaferBase, ILeaf, ILeafInputData, ILeafData, ILeaferCanvas, IRenderOptions, IBoundsType, ILocationType, IMatrixWithBoundsData, ILayoutBoundsData, IValue, ILeafLayout, InnerId, IHitCanvas, IRadiusPointData, IEventListenerMap, IEventListener, IEventListenerId, IEvent, IObject, IFunction, IPointData, IBoundsData, IBranch, IFindMethod, IMatrixData, IAttrDecorator, IMatrixWithBoundsScaleData, IMatrixWithScaleData, IAlign, IJSONOptions, IEventMap, IEventOption, IAxis, IMotionPathData, IUnitData, IRotationPointData } from '@leafer/interface'
|
|
1
|
+
import { ILeaferBase, ILeaf, ILeafInputData, ILeafData, ILeaferCanvas, IRenderOptions, IBoundsType, ILocationType, IMatrixWithBoundsData, ILayoutBoundsData, IValue, ILeafLayout, InnerId, IHitCanvas, IRadiusPointData, IEventListenerMap, IEventListener, IEventListenerId, IEvent, IObject, IFunction, IPointData, IBoundsData, IBranch, IFindMethod, IMatrixData, IAttrDecorator, IMatrixWithBoundsScaleData, IMatrixWithScaleData, IAlign, IJSONOptions, IEventMap, IEventOption, IAxis, IMotionPathData, IUnitData, IRotationPointData, ITransition } from '@leafer/interface'
|
|
2
2
|
import { BoundsHelper, IncrementId, MatrixHelper, PointHelper } from '@leafer/math'
|
|
3
3
|
import { LeafData } from '@leafer/data'
|
|
4
4
|
import { LeafLayout } from '@leafer/layout'
|
|
@@ -466,58 +466,58 @@ export class Leaf implements ILeaf {
|
|
|
466
466
|
|
|
467
467
|
// transform
|
|
468
468
|
|
|
469
|
-
public setTransform(matrix: IMatrixData, resize?: boolean): void {
|
|
470
|
-
setTransform(this, matrix, resize)
|
|
469
|
+
public setTransform(matrix: IMatrixData, resize?: boolean, transition?: ITransition): void {
|
|
470
|
+
setTransform(this, matrix, resize, transition)
|
|
471
471
|
}
|
|
472
472
|
|
|
473
|
-
public transform(matrix: IMatrixData, resize?: boolean): void {
|
|
474
|
-
transform(this, matrix, resize)
|
|
473
|
+
public transform(matrix: IMatrixData, resize?: boolean, transition?: ITransition): void {
|
|
474
|
+
transform(this, matrix, resize, transition)
|
|
475
475
|
}
|
|
476
476
|
|
|
477
|
-
public move(x: number | IPointData, y?: number, transition?:
|
|
477
|
+
public move(x: number | IPointData, y?: number, transition?: ITransition): void {
|
|
478
478
|
moveLocal(this, x, y, transition)
|
|
479
479
|
}
|
|
480
480
|
|
|
481
481
|
|
|
482
|
-
public moveInner(x: number | IPointData, y?: number, transition?:
|
|
482
|
+
public moveInner(x: number | IPointData, y?: number, transition?: ITransition): void {
|
|
483
483
|
moveWorld(this, x, y, true, transition)
|
|
484
484
|
}
|
|
485
485
|
|
|
486
|
-
public scaleOf(origin: IPointData | IAlign, scaleX: number, scaleY?: number, resize?: boolean): void {
|
|
487
|
-
zoomOfLocal(this, getLocalOrigin(this, origin), scaleX, scaleY, resize)
|
|
486
|
+
public scaleOf(origin: IPointData | IAlign, scaleX: number, scaleY?: number | ITransition, resize?: boolean, transition?: ITransition): void {
|
|
487
|
+
zoomOfLocal(this, getLocalOrigin(this, origin), scaleX, scaleY, resize, transition)
|
|
488
488
|
}
|
|
489
489
|
|
|
490
|
-
public rotateOf(origin: IPointData | IAlign, rotation: number): void {
|
|
491
|
-
rotateOfLocal(this, getLocalOrigin(this, origin), rotation)
|
|
490
|
+
public rotateOf(origin: IPointData | IAlign, rotation: number, transition?: ITransition): void {
|
|
491
|
+
rotateOfLocal(this, getLocalOrigin(this, origin), rotation, transition)
|
|
492
492
|
}
|
|
493
493
|
|
|
494
|
-
public skewOf(origin: IPointData | IAlign, skewX: number, skewY?: number, resize?: boolean): void {
|
|
495
|
-
skewOfLocal(this, getLocalOrigin(this, origin), skewX, skewY, resize)
|
|
494
|
+
public skewOf(origin: IPointData | IAlign, skewX: number, skewY?: number, resize?: boolean, transition?: ITransition): void {
|
|
495
|
+
skewOfLocal(this, getLocalOrigin(this, origin), skewX, skewY, resize, transition)
|
|
496
496
|
}
|
|
497
497
|
|
|
498
498
|
|
|
499
|
-
public transformWorld(worldTransform?: IMatrixData, resize?: boolean): void {
|
|
500
|
-
transformWorld(this, worldTransform, resize)
|
|
499
|
+
public transformWorld(worldTransform?: IMatrixData, resize?: boolean, transition?: ITransition): void {
|
|
500
|
+
transformWorld(this, worldTransform, resize, transition)
|
|
501
501
|
}
|
|
502
502
|
|
|
503
|
-
public moveWorld(x: number | IPointData, y?: number, transition?:
|
|
503
|
+
public moveWorld(x: number | IPointData, y?: number, transition?: ITransition): void {
|
|
504
504
|
moveWorld(this, x, y, false, transition)
|
|
505
505
|
}
|
|
506
506
|
|
|
507
|
-
public scaleOfWorld(worldOrigin: IPointData, scaleX: number, scaleY?: number, resize?: boolean): void {
|
|
508
|
-
zoomOfWorld(this, worldOrigin, scaleX, scaleY, resize)
|
|
507
|
+
public scaleOfWorld(worldOrigin: IPointData, scaleX: number, scaleY?: number | ITransition, resize?: boolean, transition?: ITransition): void {
|
|
508
|
+
zoomOfWorld(this, worldOrigin, scaleX, scaleY, resize, transition)
|
|
509
509
|
}
|
|
510
510
|
|
|
511
511
|
public rotateOfWorld(worldOrigin: IPointData, rotation: number): void {
|
|
512
512
|
rotateOfWorld(this, worldOrigin, rotation)
|
|
513
513
|
}
|
|
514
514
|
|
|
515
|
-
public skewOfWorld(worldOrigin: IPointData, skewX: number, skewY?: number, resize?: boolean): void {
|
|
516
|
-
skewOfWorld(this, worldOrigin, skewX, skewY, resize)
|
|
515
|
+
public skewOfWorld(worldOrigin: IPointData, skewX: number, skewY?: number, resize?: boolean, transition?: ITransition): void {
|
|
516
|
+
skewOfWorld(this, worldOrigin, skewX, skewY, resize, transition)
|
|
517
517
|
}
|
|
518
518
|
|
|
519
|
-
public flip(axis: IAxis): void {
|
|
520
|
-
transform(this, getFlipTransform(this, axis))
|
|
519
|
+
public flip(axis: IAxis, transition?: ITransition): void {
|
|
520
|
+
transform(this, getFlipTransform(this, axis), false, transition)
|
|
521
521
|
}
|
|
522
522
|
|
|
523
523
|
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ILeaf, InnerId, ILeaferBase, ILeafData, ILeafLayout, IMatrixWithBoundsScaleData, IMatrixWithBoundsData, IMatrixData, IBoundsData, IMatrixWithScaleData, IHitCanvas, IEventMap, IEventListenerMap, ILeafInputData, IFunction, IObject, IValue, IJSONOptions, IFindMethod, ILeaferCanvas, IRenderOptions, ILocationType, IBoundsType, ILayoutBoundsData, IPointData, IAlign, IAxis, IRadiusPointData, IMotionPathData, IUnitData, IRotationPointData, IEventListener, IEventOption, IEventListenerId, IEvent, IAttrDecorator } from '@leafer/interface';
|
|
1
|
+
import { ILeaf, InnerId, ILeaferBase, ILeafData, ILeafLayout, IMatrixWithBoundsScaleData, IMatrixWithBoundsData, IMatrixData, IBoundsData, IMatrixWithScaleData, IHitCanvas, IEventMap, IEventListenerMap, ILeafInputData, IFunction, IObject, IValue, IJSONOptions, IFindMethod, ILeaferCanvas, IRenderOptions, ILocationType, IBoundsType, ILayoutBoundsData, IPointData, ITransition, IAlign, IAxis, IRadiusPointData, IMotionPathData, IUnitData, IRotationPointData, IEventListener, IEventOption, IEventListenerId, IEvent, IAttrDecorator } from '@leafer/interface';
|
|
2
2
|
import { LeafData } from '@leafer/data';
|
|
3
3
|
import { LeafLayout } from '@leafer/layout';
|
|
4
4
|
|
|
@@ -128,19 +128,19 @@ declare class Leaf implements ILeaf {
|
|
|
128
128
|
getWorldPointByBox(box: IPointData, relative?: ILeaf, distance?: boolean, change?: boolean): IPointData;
|
|
129
129
|
getWorldPointByLocal(local: IPointData, relative?: ILeaf, distance?: boolean, change?: boolean): IPointData;
|
|
130
130
|
getWorldPointByPage(page: IPointData, relative?: ILeaf, distance?: boolean, change?: boolean): IPointData;
|
|
131
|
-
setTransform(matrix: IMatrixData, resize?: boolean): void;
|
|
132
|
-
transform(matrix: IMatrixData, resize?: boolean): void;
|
|
133
|
-
move(x: number | IPointData, y?: number, transition?:
|
|
134
|
-
moveInner(x: number | IPointData, y?: number, transition?:
|
|
135
|
-
scaleOf(origin: IPointData | IAlign, scaleX: number, scaleY?: number, resize?: boolean): void;
|
|
136
|
-
rotateOf(origin: IPointData | IAlign, rotation: number): void;
|
|
137
|
-
skewOf(origin: IPointData | IAlign, skewX: number, skewY?: number, resize?: boolean): void;
|
|
138
|
-
transformWorld(worldTransform?: IMatrixData, resize?: boolean): void;
|
|
139
|
-
moveWorld(x: number | IPointData, y?: number, transition?:
|
|
140
|
-
scaleOfWorld(worldOrigin: IPointData, scaleX: number, scaleY?: number, resize?: boolean): void;
|
|
131
|
+
setTransform(matrix: IMatrixData, resize?: boolean, transition?: ITransition): void;
|
|
132
|
+
transform(matrix: IMatrixData, resize?: boolean, transition?: ITransition): void;
|
|
133
|
+
move(x: number | IPointData, y?: number, transition?: ITransition): void;
|
|
134
|
+
moveInner(x: number | IPointData, y?: number, transition?: ITransition): void;
|
|
135
|
+
scaleOf(origin: IPointData | IAlign, scaleX: number, scaleY?: number | ITransition, resize?: boolean, transition?: ITransition): void;
|
|
136
|
+
rotateOf(origin: IPointData | IAlign, rotation: number, transition?: ITransition): void;
|
|
137
|
+
skewOf(origin: IPointData | IAlign, skewX: number, skewY?: number, resize?: boolean, transition?: ITransition): void;
|
|
138
|
+
transformWorld(worldTransform?: IMatrixData, resize?: boolean, transition?: ITransition): void;
|
|
139
|
+
moveWorld(x: number | IPointData, y?: number, transition?: ITransition): void;
|
|
140
|
+
scaleOfWorld(worldOrigin: IPointData, scaleX: number, scaleY?: number | ITransition, resize?: boolean, transition?: ITransition): void;
|
|
141
141
|
rotateOfWorld(worldOrigin: IPointData, rotation: number): void;
|
|
142
|
-
skewOfWorld(worldOrigin: IPointData, skewX: number, skewY?: number, resize?: boolean): void;
|
|
143
|
-
flip(axis: IAxis): void;
|
|
142
|
+
skewOfWorld(worldOrigin: IPointData, skewX: number, skewY?: number, resize?: boolean, transition?: ITransition): void;
|
|
143
|
+
flip(axis: IAxis, transition?: ITransition): void;
|
|
144
144
|
scaleResize(scaleX: number, scaleY?: number, _noResize?: boolean): void;
|
|
145
145
|
__scaleResize(_scaleX: number, _scaleY: number): void;
|
|
146
146
|
resizeWidth(_width: number): void;
|