Skip to content

Commit

Permalink
Merge pull request #518 from lixinghua123/lixinghua-alpha
Browse files Browse the repository at this point in the history
fix: Polygon tool text is displayed at the penultimate point
  • Loading branch information
lihqi authored Jul 11, 2024
2 parents 0efcecb + 45e2b6e commit 25b5d3a
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,7 @@ export default class ViewOperation extends BasicToolOperation {
DrawUtils.drawText(this.canvas, this.appendOffset(renderPolygon[0]), headerText, fontStyle);
}
if (bottomText) {
const endPoint = renderPolygon[renderPolygon.length - 1];

const endPoint = renderPolygon[renderPolygon.length - 2];
DrawUtils.drawText(
this.canvas,
this.appendOffset({ x: endPoint.x + TEXT_ATTRIBUTE_OFFSET.x, y: endPoint.y + TEXT_ATTRIBUTE_OFFSET.y }),
Expand Down

0 comments on commit 25b5d3a

Please sign in to comment.