@leafer/layout 1.0.0-rc.3 → 1.0.0-rc.5

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/layout",
3
- "version": "1.0.0-rc.3",
3
+ "version": "1.0.0-rc.5",
4
4
  "description": "@leafer/layout",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,10 +22,10 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/math": "1.0.0-rc.3",
26
- "@leafer/platform": "1.0.0-rc.3"
25
+ "@leafer/math": "1.0.0-rc.5",
26
+ "@leafer/platform": "1.0.0-rc.5"
27
27
  },
28
28
  "devDependencies": {
29
- "@leafer/interface": "1.0.0-rc.3"
29
+ "@leafer/interface": "1.0.0-rc.5"
30
30
  }
31
31
  }
package/src/LeafLayout.ts CHANGED
@@ -9,7 +9,7 @@ export class LeafLayout implements ILeafLayout {
9
9
 
10
10
  public leaf: ILeaf
11
11
 
12
- public useZoomProxy: boolean
12
+ public proxyZoom: boolean
13
13
 
14
14
  // local
15
15
 
@@ -35,7 +35,6 @@ export class LeafLayout implements ILeafLayout {
35
35
 
36
36
  // matrix changed
37
37
  public matrixChanged: boolean
38
- public positionChanged: boolean
39
38
  public scaleChanged: boolean
40
39
  public rotationChanged: boolean
41
40
 
@@ -72,7 +71,7 @@ export class LeafLayout implements ILeafLayout {
72
71
  this.renderBounds = this.strokeBounds = this.boxBounds = { x: 0, y: 0, width: 0, height: 0 }
73
72
  this.localRenderBounds = this.localStrokeBounds = leaf.__local
74
73
  this.boxChange()
75
- this.positionChange()
74
+ this.matrixChange()
76
75
  }
77
76
 
78
77
 
@@ -219,12 +218,6 @@ export class LeafLayout implements ILeafLayout {
219
218
 
220
219
  // matrix
221
220
 
222
- public positionChange(): void {
223
- this.positionChanged = true
224
- this.matrixChanged = true
225
- this.localBoxChanged || this.localBoxChange()
226
- }
227
-
228
221
  public scaleChange(): void {
229
222
  this.scaleChanged = true
230
223
  this._scaleOrRotationChange()
@@ -238,6 +231,10 @@ export class LeafLayout implements ILeafLayout {
238
231
 
239
232
  protected _scaleOrRotationChange() {
240
233
  this.affectScaleOrRotation = true
234
+ this.matrixChange()
235
+ }
236
+
237
+ public matrixChange(): void {
241
238
  this.matrixChanged = true
242
239
  this.localBoxChanged || this.localBoxChange()
243
240
  }
package/types/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { ILeafLayout, ILeaf, IBoundsData, ILayoutLocationType, IMatrixData, ILay
2
2
 
3
3
  declare class LeafLayout implements ILeafLayout {
4
4
  leaf: ILeaf;
5
- useZoomProxy: boolean;
5
+ proxyZoom: boolean;
6
6
  boxBounds: IBoundsData;
7
7
  strokeBounds: IBoundsData;
8
8
  renderBounds: IBoundsData;
@@ -14,7 +14,6 @@ declare class LeafLayout implements ILeafLayout {
14
14
  protected _worldBoxBounds: IBoundsData;
15
15
  protected _worldStrokeBounds: IBoundsData;
16
16
  matrixChanged: boolean;
17
- positionChanged: boolean;
18
17
  scaleChanged: boolean;
19
18
  rotationChanged: boolean;
20
19
  boundsChanged: boolean;
@@ -48,10 +47,10 @@ declare class LeafLayout implements ILeafLayout {
48
47
  localBoxChange(): void;
49
48
  strokeChange(): void;
50
49
  renderChange(): void;
51
- positionChange(): void;
52
50
  scaleChange(): void;
53
51
  rotationChange(): void;
54
52
  protected _scaleOrRotationChange(): void;
53
+ matrixChange(): void;
55
54
  surfaceChange(): void;
56
55
  opacityChange(): void;
57
56
  childrenSortChange(): void;