@leafer/display-module 1.0.0-alpha.10 → 1.0.0-alpha.21
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 +4 -4
- package/src/LeafBounds.ts +15 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer/display-module",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.21",
|
|
4
4
|
"description": "@leafer/display-module",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"leaferjs"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@leafer/event": "1.0.0-alpha.
|
|
23
|
-
"@leafer/math": "1.0.0-alpha.
|
|
22
|
+
"@leafer/event": "1.0.0-alpha.21",
|
|
23
|
+
"@leafer/math": "1.0.0-alpha.21"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@leafer/interface": "1.0.0-alpha.
|
|
26
|
+
"@leafer/interface": "1.0.0-alpha.21"
|
|
27
27
|
}
|
|
28
28
|
}
|
package/src/LeafBounds.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ILeafBoundsModule } from '@leafer/interface'
|
|
|
2
2
|
import { BoundsHelper } from '@leafer/math'
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
const {
|
|
5
|
+
const { toWorld, copyAndSpread } = BoundsHelper
|
|
6
6
|
|
|
7
7
|
export const LeafBounds: ILeafBoundsModule = {
|
|
8
8
|
|
|
@@ -85,26 +85,26 @@ export const LeafBounds: ILeafBoundsModule = {
|
|
|
85
85
|
|
|
86
86
|
layout.boundsChanged = false
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
toWorld(this.__layout.renderBounds, this.__world, this.__world)
|
|
89
89
|
|
|
90
90
|
if (resize) this.__onUpdateSize()
|
|
91
91
|
|
|
92
92
|
} else {
|
|
93
|
-
|
|
93
|
+
toWorld(this.__layout.renderBounds, this.__world, this.__world)
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
},
|
|
97
97
|
|
|
98
98
|
__updateRelativeBoxBounds(): void {
|
|
99
|
-
|
|
99
|
+
toWorld(this.__layout.boxBounds, this.__relative, this.__relative)
|
|
100
100
|
},
|
|
101
101
|
|
|
102
102
|
__updateRelativeEventBounds(): void {
|
|
103
|
-
|
|
103
|
+
toWorld(this.__layout.eventBounds, this.__relative, this.__layout.relativeEventBounds)
|
|
104
104
|
},
|
|
105
105
|
|
|
106
106
|
__updateRelativeRenderBounds(): void {
|
|
107
|
-
|
|
107
|
+
toWorld(this.__layout.renderBounds, this.__relative, this.__layout.relativeRenderBounds)
|
|
108
108
|
},
|
|
109
109
|
|
|
110
110
|
|
|
@@ -114,6 +114,14 @@ export const LeafBounds: ILeafBoundsModule = {
|
|
|
114
114
|
b.y = 0
|
|
115
115
|
b.width = this.__.width
|
|
116
116
|
b.height = this.__.height
|
|
117
|
-
}
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
__updateEventBounds(): void {
|
|
120
|
+
copyAndSpread(this.__layout.eventBounds, this.__layout.boxBounds, this.__layout.eventBoundsSpreadWidth)
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
__updateRenderBounds(): void {
|
|
124
|
+
copyAndSpread(this.__layout.renderBounds, this.__layout.eventBounds, this.__layout.renderBoundsSpreadWidth)
|
|
125
|
+
},
|
|
118
126
|
|
|
119
127
|
}
|