Skip to content

Commit

Permalink
remove special case (#5345)
Browse files Browse the repository at this point in the history
  • Loading branch information
asturur authored Oct 27, 2018
1 parent 0a76ff3 commit 09e8af1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/shapes/rect.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,8 @@
*/
_render: function(ctx) {

// optimize 1x1 case (used in spray brush)
if (this.width === 1 && this.height === 1) {
ctx.fillRect(-0.5, -0.5, 1, 1);
return;
}
// 1x1 case (used in spray brush) optimization was removed because
// with caching and higher zoom level this makes more damage than help

var rx = this.rx ? Math.min(this.rx, this.width / 2) : 0,
ry = this.ry ? Math.min(this.ry, this.height / 2) : 0,
Expand Down

0 comments on commit 09e8af1

Please sign in to comment.