Skip to content

Commit

Permalink
fix: Support rectangles with strokes too
Browse files Browse the repository at this point in the history
  • Loading branch information
rockerBOO committed May 2, 2022
1 parent be1da8d commit c0fa324
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/controls.render.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
transparentCorners = typeof styleOverride.transparentCorners !== 'undefined' ?
styleOverride.transparentCorners : fabricObject.transparentCorners,
methodName = transparentCorners ? 'stroke' : 'fill',
stroke = !transparentCorners && (styleOverride.cornerStrokeColor || fabricObject.cornerStrokeColor || this.stroke),
stroke = !transparentCorners && (
styleOverride.cornerStrokeColor || fabricObject.cornerStrokeColor || this.stroke
),
myLeft = left,
myTop = top, size,
lineWidth = this.lineWidth || 1;
Expand Down Expand Up @@ -75,7 +77,7 @@
styleOverride.transparentCorners : fabricObject.transparentCorners,
methodName = transparentCorners ? 'stroke' : 'fill',
stroke = !transparentCorners && (
styleOverride.cornerStrokeColor || fabricObject.cornerStrokeColor
styleOverride.cornerStrokeColor || fabricObject.cornerStrokeColor || this.stroke
), xSizeBy2 = xSize / 2, ySizeBy2 = ySize / 2,
lineWidth = this.lineWidth || 1;
ctx.save();
Expand Down

0 comments on commit c0fa324

Please sign in to comment.