@leafer/display 2.1.2 → 2.1.4

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer/display",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "description": "@leafer/display",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,18 +22,18 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/math": "2.1.2",
26
- "@leafer/data": "2.1.2",
27
- "@leafer/layout": "2.1.2",
28
- "@leafer/display-module": "2.1.2",
29
- "@leafer/event": "2.1.2",
30
- "@leafer/decorator": "2.1.2",
31
- "@leafer/helper": "2.1.2",
32
- "@leafer/image": "2.1.2",
33
- "@leafer/debug": "2.1.2",
34
- "@leafer/platform": "2.1.2"
25
+ "@leafer/math": "2.1.4",
26
+ "@leafer/data": "2.1.4",
27
+ "@leafer/layout": "2.1.4",
28
+ "@leafer/display-module": "2.1.4",
29
+ "@leafer/event": "2.1.4",
30
+ "@leafer/decorator": "2.1.4",
31
+ "@leafer/helper": "2.1.4",
32
+ "@leafer/image": "2.1.4",
33
+ "@leafer/debug": "2.1.4",
34
+ "@leafer/platform": "2.1.4"
35
35
  },
36
36
  "devDependencies": {
37
- "@leafer/interface": "2.1.2"
37
+ "@leafer/interface": "2.1.4"
38
38
  }
39
39
  }
package/src/Leaf.ts CHANGED
@@ -492,12 +492,12 @@ export class Leaf<TInputData = ILeafInputData> implements ILeaf {
492
492
 
493
493
  // transform
494
494
 
495
- public setTransform(matrix: IMatrixData, resize?: boolean, transition?: ITransition): void {
496
- setTransform(this, matrix, resize, transition)
495
+ public setTransform(matrix: IMatrixData, resize?: boolean, transition?: ITransition, boundsType?: IBoundsType): void {
496
+ setTransform(this, matrix, resize, transition, boundsType)
497
497
  }
498
498
 
499
- public transform(matrix: IMatrixData, resize?: boolean, transition?: ITransition): void {
500
- transform(this, matrix, resize, transition)
499
+ public transform(matrix: IMatrixData, resize?: boolean, transition?: ITransition, boundsType?: IBoundsType): void {
500
+ transform(this, matrix, resize, transition, boundsType)
501
501
  }
502
502
 
503
503
  public move(x: number | IPointData, y?: number, transition?: ITransition): void {
@@ -509,8 +509,8 @@ export class Leaf<TInputData = ILeafInputData> implements ILeaf {
509
509
  moveWorld(this, x, y, true, transition)
510
510
  }
511
511
 
512
- public scaleOf(origin: IPointData | IAlign, scaleX: number, scaleY?: number | ITransition, resize?: boolean, transition?: ITransition): void {
513
- zoomOfLocal(this, getLocalOrigin(this, origin), scaleX, scaleY, resize, transition)
512
+ public scaleOf(origin: IPointData | IAlign, scaleX: number, scaleY?: number | ITransition, resize?: boolean, transition?: ITransition, boundsType?: IBoundsType): void {
513
+ zoomOfLocal(this, getLocalOrigin(this, origin), scaleX, scaleY, resize, transition, boundsType)
514
514
  }
515
515
 
516
516
  public rotateOf(origin: IPointData | IAlign, rotation: number, transition?: ITransition): void {
@@ -522,16 +522,16 @@ export class Leaf<TInputData = ILeafInputData> implements ILeaf {
522
522
  }
523
523
 
524
524
 
525
- public transformWorld(worldTransform?: IMatrixData, resize?: boolean, transition?: ITransition): void {
526
- transformWorld(this, worldTransform, resize, transition)
525
+ public transformWorld(worldTransform?: IMatrixData, resize?: boolean, transition?: ITransition, boundsType?: IBoundsType): void {
526
+ transformWorld(this, worldTransform, resize, transition, boundsType)
527
527
  }
528
528
 
529
529
  public moveWorld(x: number | IPointData, y?: number, transition?: ITransition): void {
530
530
  moveWorld(this, x, y, false, transition)
531
531
  }
532
532
 
533
- public scaleOfWorld(worldOrigin: IPointData, scaleX: number, scaleY?: number | ITransition, resize?: boolean, transition?: ITransition): void {
534
- zoomOfWorld(this, worldOrigin, scaleX, scaleY, resize, transition)
533
+ public scaleOfWorld(worldOrigin: IPointData, scaleX: number, scaleY?: number | ITransition, resize?: boolean, transition?: ITransition, boundsType?: IBoundsType): void {
534
+ zoomOfWorld(this, worldOrigin, scaleX, scaleY, resize, transition, boundsType)
535
535
  }
536
536
 
537
537
  public rotateOfWorld(worldOrigin: IPointData, rotation: number): void {
@@ -549,7 +549,7 @@ export class Leaf<TInputData = ILeafInputData> implements ILeaf {
549
549
 
550
550
  // @leafer-in/resize rewrite
551
551
 
552
- public scaleResize(scaleX: number, scaleY = scaleX, _noResize?: boolean): void {
552
+ public scaleResize(scaleX: number, scaleY = scaleX, _noResize?: boolean, _boundsType?: IBoundsType): void {
553
553
  (this as ILeaf).scaleX *= scaleX;
554
554
  (this as ILeaf).scaleY *= scaleY
555
555
  }
package/types/index.d.ts CHANGED
@@ -135,20 +135,20 @@ declare class Leaf<TInputData = ILeafInputData> implements ILeaf {
135
135
  getWorldPointByBox(box: IPointData, relative?: ILeaf, distance?: boolean, change?: boolean): IPointData;
136
136
  getWorldPointByLocal(local: IPointData, relative?: ILeaf, distance?: boolean, change?: boolean): IPointData;
137
137
  getWorldPointByPage(page: IPointData, relative?: ILeaf, distance?: boolean, change?: boolean): IPointData;
138
- setTransform(matrix: IMatrixData, resize?: boolean, transition?: ITransition): void;
139
- transform(matrix: IMatrixData, resize?: boolean, transition?: ITransition): void;
138
+ setTransform(matrix: IMatrixData, resize?: boolean, transition?: ITransition, boundsType?: IBoundsType): void;
139
+ transform(matrix: IMatrixData, resize?: boolean, transition?: ITransition, boundsType?: IBoundsType): void;
140
140
  move(x: number | IPointData, y?: number, transition?: ITransition): void;
141
141
  moveInner(x: number | IPointData, y?: number, transition?: ITransition): void;
142
- scaleOf(origin: IPointData | IAlign, scaleX: number, scaleY?: number | ITransition, resize?: boolean, transition?: ITransition): void;
142
+ scaleOf(origin: IPointData | IAlign, scaleX: number, scaleY?: number | ITransition, resize?: boolean, transition?: ITransition, boundsType?: IBoundsType): void;
143
143
  rotateOf(origin: IPointData | IAlign, rotation: number, transition?: ITransition): void;
144
144
  skewOf(origin: IPointData | IAlign, skewX: number, skewY?: number, resize?: boolean, transition?: ITransition): void;
145
- transformWorld(worldTransform?: IMatrixData, resize?: boolean, transition?: ITransition): void;
145
+ transformWorld(worldTransform?: IMatrixData, resize?: boolean, transition?: ITransition, boundsType?: IBoundsType): void;
146
146
  moveWorld(x: number | IPointData, y?: number, transition?: ITransition): void;
147
- scaleOfWorld(worldOrigin: IPointData, scaleX: number, scaleY?: number | ITransition, resize?: boolean, transition?: ITransition): void;
147
+ scaleOfWorld(worldOrigin: IPointData, scaleX: number, scaleY?: number | ITransition, resize?: boolean, transition?: ITransition, boundsType?: IBoundsType): void;
148
148
  rotateOfWorld(worldOrigin: IPointData, rotation: number): void;
149
149
  skewOfWorld(worldOrigin: IPointData, skewX: number, skewY?: number, resize?: boolean, transition?: ITransition): void;
150
150
  flip(axis: IAxis, transition?: ITransition): void;
151
- scaleResize(scaleX: number, scaleY?: number, _noResize?: boolean): void;
151
+ scaleResize(scaleX: number, scaleY?: number, _noResize?: boolean, _boundsType?: IBoundsType): void;
152
152
  __scaleResize(_scaleX: number, _scaleY: number): void;
153
153
  resizeWidth(_width: number): void;
154
154
  resizeHeight(_height: number): void;