Skip to content

Commit

Permalink
fix: node ellipse
Browse files Browse the repository at this point in the history
  • Loading branch information
leaferjs committed Oct 12, 2023
1 parent 208af37 commit 35acb73
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/display/src/Ellipse.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { __Number } from '@leafer/interface'
import { PathCommandDataHelper, dataProcessor, pathType, registerUI } from '@leafer/core'
import { PathCommandDataHelper, PathConvert, Platform, dataProcessor, pathType, registerUI } from '@leafer/core'

import { IEllipse, IEllipseInputData, IEllipseData } from '@leafer-ui/interface'
import { EllipseData } from '@leafer-ui/data'
Expand Down Expand Up @@ -48,9 +48,12 @@ export class Ellipse extends UI implements IEllipse {
ellipse(path, rx, ry, rx * innerRadius, ry * innerRadius)
moveTo(path, width, ry)
}
ellipse(path, rx, ry, rx, ry, 0, 0, 360, true)
ellipse(path, rx, ry, rx, ry, 0, 360, 0, true)
}

// fix node
if (Platform.name === 'node') this.__.path = PathConvert.toCanvasData(path, true)

} else {

if (startAngle || endAngle) {
Expand Down

0 comments on commit 35acb73

Please sign in to comment.