@leafer-ui/event 1.0.9 → 1.0.10
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 +3 -3
- package/src/UIEvent.ts +4 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/event",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "@leafer-ui/event",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/core": "1.0.
|
|
25
|
+
"@leafer/core": "1.0.10"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@leafer/interface": "1.0.
|
|
28
|
+
"@leafer/interface": "1.0.10"
|
|
29
29
|
}
|
|
30
30
|
}
|
package/src/UIEvent.ts
CHANGED
|
@@ -34,18 +34,15 @@ export class UIEvent extends Event implements IUIEvent {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
public getBoxPoint(relative?: ILeaf): IPointData {
|
|
37
|
-
|
|
38
|
-
return relative.getBoxPoint(this)
|
|
37
|
+
return (relative || this.current).getBoxPoint(this)
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
public getInnerPoint(relative?: ILeaf): IPointData {
|
|
42
|
-
|
|
43
|
-
return relative.getInnerPoint(this)
|
|
41
|
+
return (relative || this.current).getInnerPoint(this)
|
|
44
42
|
}
|
|
45
43
|
|
|
46
44
|
public getLocalPoint(relative?: ILeaf): IPointData {
|
|
47
|
-
|
|
48
|
-
return relative.getLocalPoint(this)
|
|
45
|
+
return (relative || this.current).getLocalPoint(this)
|
|
49
46
|
}
|
|
50
47
|
|
|
51
48
|
public getPagePoint(): IPointData {
|
|
@@ -56,6 +53,7 @@ export class UIEvent extends Event implements IUIEvent {
|
|
|
56
53
|
public getInner(relative?: ILeaf): IPointData { return this.getInnerPoint(relative) }
|
|
57
54
|
public getLocal(relative?: ILeaf): IPointData { return this.getLocalPoint(relative) }
|
|
58
55
|
public getPage(): IPointData { return this.getPagePoint() }
|
|
56
|
+
// ---
|
|
59
57
|
|
|
60
58
|
static changeName(oldName: string, newName: string): void {
|
|
61
59
|
EventCreator.changeName(oldName, newName)
|