@leafer/layout 1.0.0-beta.12 → 1.0.0-beta.16
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 +8 -5
- package/src/LeafLayout.ts +2 -7
- package/types/index.d.ts +61 -0
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer/layout",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.16",
|
|
4
4
|
"description": "@leafer/layout",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "src/index.ts",
|
|
8
|
+
"types": "types/index.d.ts",
|
|
8
9
|
"files": [
|
|
9
|
-
"src"
|
|
10
|
+
"src",
|
|
11
|
+
"types",
|
|
12
|
+
"dist"
|
|
10
13
|
],
|
|
11
14
|
"repository": {
|
|
12
15
|
"type": "git",
|
|
@@ -19,10 +22,10 @@
|
|
|
19
22
|
"leaferjs"
|
|
20
23
|
],
|
|
21
24
|
"dependencies": {
|
|
22
|
-
"@leafer/math": "1.0.0-beta.
|
|
23
|
-
"@leafer/platform": "1.0.0-beta.
|
|
25
|
+
"@leafer/math": "1.0.0-beta.16",
|
|
26
|
+
"@leafer/platform": "1.0.0-beta.16"
|
|
24
27
|
},
|
|
25
28
|
"devDependencies": {
|
|
26
|
-
"@leafer/interface": "1.0.0-beta.
|
|
29
|
+
"@leafer/interface": "1.0.0-beta.16"
|
|
27
30
|
}
|
|
28
31
|
}
|
package/src/LeafLayout.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ILeaf, ILeafLayout, ILayoutLocationType, ILayoutBoundsType, IBoundsData, IMatrixData
|
|
2
|
-
import { BoundsHelper
|
|
1
|
+
import { ILeaf, ILeafLayout, ILayoutLocationType, ILayoutBoundsType, IBoundsData, IMatrixData } from '@leafer/interface'
|
|
2
|
+
import { BoundsHelper } from '@leafer/math'
|
|
3
3
|
import { Platform } from '@leafer/platform'
|
|
4
4
|
|
|
5
5
|
|
|
@@ -96,11 +96,6 @@ export class LeafLayout implements ILeafLayout {
|
|
|
96
96
|
return locationType === 'world' ? this.leaf.__world : this.leaf.__local
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
public decomposeTransform(locationType: ILayoutLocationType): IMatrixDecompositionData {
|
|
100
|
-
this.checkUpdate()
|
|
101
|
-
return MatrixHelper.decompose(locationType === 'world' ? this.leaf.__world : this.leaf.__local)
|
|
102
|
-
}
|
|
103
|
-
|
|
104
99
|
public getBounds(type: ILayoutBoundsType, locationType: ILayoutLocationType): IBoundsData {
|
|
105
100
|
|
|
106
101
|
this.checkUpdate()
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ILeafLayout, ILeaf, IBoundsData, ILayoutLocationType, IMatrixData, ILayoutBoundsType } from '@leafer/interface';
|
|
2
|
+
|
|
3
|
+
declare class LeafLayout implements ILeafLayout {
|
|
4
|
+
leaf: ILeaf;
|
|
5
|
+
useZoomProxy: boolean;
|
|
6
|
+
boxBounds: IBoundsData;
|
|
7
|
+
strokeBounds: IBoundsData;
|
|
8
|
+
renderBounds: IBoundsData;
|
|
9
|
+
marginBounds: IBoundsData;
|
|
10
|
+
contentBounds: IBoundsData;
|
|
11
|
+
localStrokeBounds: IBoundsData;
|
|
12
|
+
localRenderBounds: IBoundsData;
|
|
13
|
+
protected _worldContentBounds: IBoundsData;
|
|
14
|
+
protected _worldBoxBounds: IBoundsData;
|
|
15
|
+
protected _worldStrokeBounds: IBoundsData;
|
|
16
|
+
matrixChanged: boolean;
|
|
17
|
+
positionChanged: boolean;
|
|
18
|
+
scaleChanged: boolean;
|
|
19
|
+
rotationChanged: boolean;
|
|
20
|
+
boundsChanged: boolean;
|
|
21
|
+
boxChanged: boolean;
|
|
22
|
+
strokeChanged: boolean;
|
|
23
|
+
renderChanged: boolean;
|
|
24
|
+
localBoxChanged: boolean;
|
|
25
|
+
surfaceChanged: boolean;
|
|
26
|
+
opacityChanged: boolean;
|
|
27
|
+
hitCanvasChanged: boolean;
|
|
28
|
+
childrenSortChanged?: boolean;
|
|
29
|
+
affectScaleOrRotation: boolean;
|
|
30
|
+
affectRotation: boolean;
|
|
31
|
+
affectChildrenSort?: boolean;
|
|
32
|
+
strokeSpread: number;
|
|
33
|
+
renderSpread: number;
|
|
34
|
+
strokeBoxSpread: number;
|
|
35
|
+
renderShapeSpread: number;
|
|
36
|
+
constructor(leaf: ILeaf);
|
|
37
|
+
checkUpdate(force?: boolean): void;
|
|
38
|
+
getTransform(locationType: ILayoutLocationType): IMatrixData;
|
|
39
|
+
getBounds(type: ILayoutBoundsType, locationType: ILayoutLocationType): IBoundsData;
|
|
40
|
+
protected getWorldContentBounds(): IBoundsData;
|
|
41
|
+
protected getWorldBoxBounds(): IBoundsData;
|
|
42
|
+
protected getWorldStrokeBounds(): IBoundsData;
|
|
43
|
+
spreadStrokeCancel(): void;
|
|
44
|
+
spreadRenderCancel(): void;
|
|
45
|
+
spreadStroke(): void;
|
|
46
|
+
spreadRender(): void;
|
|
47
|
+
boxChange(): void;
|
|
48
|
+
localBoxChange(): void;
|
|
49
|
+
strokeChange(): void;
|
|
50
|
+
renderChange(): void;
|
|
51
|
+
positionChange(): void;
|
|
52
|
+
scaleChange(): void;
|
|
53
|
+
rotationChange(): void;
|
|
54
|
+
protected _scaleOrRotationChange(): void;
|
|
55
|
+
surfaceChange(): void;
|
|
56
|
+
opacityChange(): void;
|
|
57
|
+
childrenSortChange(): void;
|
|
58
|
+
destroy(): void;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { LeafLayout };
|