@leafer-ui/display 1.12.3 → 2.0.0

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.
Files changed (2) hide show
  1. package/package.json +8 -8
  2. package/src/Ellipse.ts +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/display",
3
- "version": "1.12.3",
3
+ "version": "2.0.0",
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.12.3",
26
- "@leafer-ui/data": "1.12.3",
27
- "@leafer-ui/display-module": "1.12.3",
28
- "@leafer-ui/decorator": "1.12.3",
29
- "@leafer-ui/external": "1.12.3"
25
+ "@leafer/core": "2.0.0",
26
+ "@leafer-ui/data": "2.0.0",
27
+ "@leafer-ui/display-module": "2.0.0",
28
+ "@leafer-ui/decorator": "2.0.0",
29
+ "@leafer-ui/external": "2.0.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@leafer/interface": "1.12.3",
33
- "@leafer-ui/interface": "1.12.3"
32
+ "@leafer/interface": "2.0.0",
33
+ "@leafer-ui/interface": "2.0.0"
34
34
  }
35
35
  }
package/src/Ellipse.ts CHANGED
@@ -33,11 +33,13 @@ export class Ellipse<TInputData = IEllipseInputData> extends UI<TInputData> impl
33
33
  const rx = width / 2, ry = height / 2
34
34
 
35
35
  const path: number[] = this.__.path = []
36
+ let open: boolean
36
37
 
37
38
  if (innerRadius) {
38
39
 
39
40
  if (startAngle || endAngle) {
40
41
  if (innerRadius < 1) ellipse(path, rx, ry, rx * innerRadius, ry * innerRadius, 0, startAngle, endAngle, false)
42
+ else open = true // 画弧线时,不能闭合路径
41
43
  ellipse(path, rx, ry, rx, ry, 0, endAngle, startAngle, true)
42
44
  } else {
43
45
  if (innerRadius < 1) {
@@ -58,7 +60,7 @@ export class Ellipse<TInputData = IEllipseInputData> extends UI<TInputData> impl
58
60
 
59
61
  }
60
62
 
61
- closePath(path)
63
+ if (!open) closePath(path)
62
64
 
63
65
  // fix node
64
66
  if (Platform.ellipseToCurve) this.__.path = this.getPath(true)