Skip to content

Commit

Permalink
fix(shape): Fixes issue with fload coordinates in Rectangle
Browse files Browse the repository at this point in the history
  • Loading branch information
ghaiklor committed Nov 19, 2015
1 parent c374d15 commit 915358c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shapes/Rectangle.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class Rectangle extends Shape {
let foreground = this.getForeground();

cursor.fill({x1, y1, x2, y2, background, foreground});
cursor.setPosition(x1 + (width / 2 - text.length / 2), y1 + (height / 2)).write(text);
cursor.setPosition(x1 + Math.round(width / 2 - text.length / 2), y1 + Math.round(height / 2)).write(text);

return this;
}
Expand Down

0 comments on commit 915358c

Please sign in to comment.