@leafer-ui/display 1.0.0-rc.2 → 1.0.0-rc.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 +8 -8
- package/src/Line.ts +1 -1
- package/src/Polygon.ts +6 -2
- package/src/UI.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/display",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.4",
|
|
4
4
|
"description": "@leafer-ui/display",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/core": "1.0.0-rc.
|
|
26
|
-
"@leafer-ui/data": "1.0.0-rc.
|
|
27
|
-
"@leafer-ui/display-module": "1.0.0-rc.
|
|
28
|
-
"@leafer-ui/decorator": "1.0.0-rc.
|
|
29
|
-
"@leafer-ui/external": "1.0.0-rc.
|
|
25
|
+
"@leafer/core": "1.0.0-rc.4",
|
|
26
|
+
"@leafer-ui/data": "1.0.0-rc.4",
|
|
27
|
+
"@leafer-ui/display-module": "1.0.0-rc.4",
|
|
28
|
+
"@leafer-ui/decorator": "1.0.0-rc.4",
|
|
29
|
+
"@leafer-ui/external": "1.0.0-rc.4"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@leafer/interface": "1.0.0-rc.
|
|
33
|
-
"@leafer-ui/interface": "1.0.0-rc.
|
|
32
|
+
"@leafer/interface": "1.0.0-rc.4",
|
|
33
|
+
"@leafer-ui/interface": "1.0.0-rc.4"
|
|
34
34
|
}
|
|
35
35
|
}
|
package/src/Line.ts
CHANGED
|
@@ -82,7 +82,7 @@ export class Line extends UI implements ILine {
|
|
|
82
82
|
|
|
83
83
|
public __updateBoxBounds(): void {
|
|
84
84
|
if (this.points) {
|
|
85
|
-
toBounds(this.__.
|
|
85
|
+
toBounds(this.__.__pathForRender, this.__layout.boxBounds)
|
|
86
86
|
this.__updateNaturalSize()
|
|
87
87
|
} else {
|
|
88
88
|
super.__updateBoxBounds()
|
package/src/Polygon.ts
CHANGED
|
@@ -62,14 +62,18 @@ export class Polygon extends UI implements IPolygon {
|
|
|
62
62
|
public __updateRenderPath(): void {
|
|
63
63
|
if (this.__.points && this.__.curve) {
|
|
64
64
|
drawPoints(this.__.__pathForRender = [], this.__.points, this.__.curve, true)
|
|
65
|
-
this.__updateNaturalSize()
|
|
66
65
|
} else {
|
|
67
66
|
super.__updateRenderPath()
|
|
68
67
|
}
|
|
69
68
|
}
|
|
70
69
|
|
|
71
70
|
public __updateBoxBounds(): void {
|
|
72
|
-
|
|
71
|
+
if (this.__.points) {
|
|
72
|
+
toBounds(this.__.__pathForRender, this.__layout.boxBounds)
|
|
73
|
+
this.__updateNaturalSize()
|
|
74
|
+
} else {
|
|
75
|
+
super.__updateBoxBounds()
|
|
76
|
+
}
|
|
73
77
|
}
|
|
74
78
|
|
|
75
79
|
}
|
package/src/UI.ts
CHANGED
|
@@ -116,7 +116,7 @@ export class UI extends Leaf implements IUI {
|
|
|
116
116
|
@hitType()
|
|
117
117
|
public hitRadius: __Number
|
|
118
118
|
|
|
119
|
-
@cursorType('
|
|
119
|
+
@cursorType('')
|
|
120
120
|
public cursor: ICursorType | ICursorType[]
|
|
121
121
|
|
|
122
122
|
// ---
|
|
@@ -223,8 +223,8 @@ export class UI extends Leaf implements IUI {
|
|
|
223
223
|
public __onUpdateSize(): void {
|
|
224
224
|
if (this.__.__input) {
|
|
225
225
|
const { fill, stroke } = this.__.__input
|
|
226
|
-
if (fill) Paint.compute(
|
|
227
|
-
if (stroke) Paint.compute(
|
|
226
|
+
if (fill) Paint.compute('fill', this)
|
|
227
|
+
if (stroke) Paint.compute('stroke', this)
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
|