@leafer/display 2.0.3 → 2.0.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 +12 -12
- package/src/Leaf.ts +5 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer/display",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.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.0.
|
|
26
|
-
"@leafer/data": "2.0.
|
|
27
|
-
"@leafer/layout": "2.0.
|
|
28
|
-
"@leafer/display-module": "2.0.
|
|
29
|
-
"@leafer/event": "2.0.
|
|
30
|
-
"@leafer/decorator": "2.0.
|
|
31
|
-
"@leafer/helper": "2.0.
|
|
32
|
-
"@leafer/image": "2.0.
|
|
33
|
-
"@leafer/debug": "2.0.
|
|
34
|
-
"@leafer/platform": "2.0.
|
|
25
|
+
"@leafer/math": "2.0.4",
|
|
26
|
+
"@leafer/data": "2.0.4",
|
|
27
|
+
"@leafer/layout": "2.0.4",
|
|
28
|
+
"@leafer/display-module": "2.0.4",
|
|
29
|
+
"@leafer/event": "2.0.4",
|
|
30
|
+
"@leafer/decorator": "2.0.4",
|
|
31
|
+
"@leafer/helper": "2.0.4",
|
|
32
|
+
"@leafer/image": "2.0.4",
|
|
33
|
+
"@leafer/debug": "2.0.4",
|
|
34
|
+
"@leafer/platform": "2.0.4"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@leafer/interface": "2.0.
|
|
37
|
+
"@leafer/interface": "2.0.4"
|
|
38
38
|
}
|
|
39
39
|
}
|
package/src/Leaf.ts
CHANGED
|
@@ -415,18 +415,20 @@ export class Leaf<TInputData = ILeafInputData> implements ILeaf {
|
|
|
415
415
|
relative.innerToWorld(world, to, distance)
|
|
416
416
|
world = to ? to : world
|
|
417
417
|
}
|
|
418
|
-
toInnerPoint(this.
|
|
418
|
+
toInnerPoint(this.worldTransform, world, to, distance)
|
|
419
419
|
}
|
|
420
420
|
|
|
421
421
|
public innerToWorld(inner: IPointData, to?: IPointData, distance?: boolean, relative?: ILeaf): void {
|
|
422
|
-
toOuterPoint(this.
|
|
422
|
+
toOuterPoint(this.worldTransform, inner, to, distance)
|
|
423
423
|
if (relative) relative.worldToInner(to ? to : inner, null, distance)
|
|
424
424
|
}
|
|
425
425
|
|
|
426
426
|
// simple
|
|
427
427
|
|
|
428
428
|
public getBoxPoint(world: IPointData, relative?: ILeaf, distance?: boolean, change?: boolean): IPointData {
|
|
429
|
-
|
|
429
|
+
const inner = this.getInnerPoint(world, relative, distance, change)
|
|
430
|
+
if (distance) return inner
|
|
431
|
+
return this.getBoxPointByInner(inner, null, null, true)
|
|
430
432
|
}
|
|
431
433
|
|
|
432
434
|
public getBoxPointByInner(inner: IPointData, _relative?: ILeaf, _distance?: boolean, change?: boolean): IPointData {
|