Skip to content

Commit

Permalink
Merge branches 'dev' and 'dev' of https://github.com/dromara/newcar i…
Browse files Browse the repository at this point in the history
…nto dev
  • Loading branch information
sheepbox8646 committed Jun 15, 2024
2 parents b37ab59 + a1e6dbc commit 98bb1f0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/basic/src/widgets/circle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Arc } from './arc'

export class Circle extends Arc {
/**
* Create a cirle
* Create a circle
* extend from Arc
* @param radius
* @param options
Expand Down
9 changes: 2 additions & 7 deletions packages/basic/src/widgets/polygon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,8 @@ export class Polygon extends Path {
this.path.addPoly(this.points.flat(), true)

changed(this.points, (points) => {
this.path.moveTo(0, 0)
for (const [index, point] of points.entries()) {
if (index === 0)
this.path.moveTo(...point)
else this.path.lineTo(...point)
}
this.path.close()
this.path.rewind()
this.path.addPoly(points.flat(), true)
})
}
}
2 changes: 1 addition & 1 deletion packages/basic/src/widgets/textGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export class TextGroup extends Figure {

paint.setColor(style.color)
this.builder.pushPaintStyle(style, paint, bg)
this.builder.addText(text.text)
this.builder.addText(text.text.value)
// TODO: Stroke and Fill
}

Expand Down

0 comments on commit 98bb1f0

Please sign in to comment.