diff --git a/src/mixins/object_interactivity.mixin.js b/src/mixins/object_interactivity.mixin.js index 994d8447af9..e2d2224ffab 100644 --- a/src/mixins/object_interactivity.mixin.js +++ b/src/mixins/object_interactivity.mixin.js @@ -289,9 +289,10 @@ methodName = this.transparentCorners ? 'strokeRect' : 'fillRect'; ctx.save(); - - ctx.lineWidth = 1; ctx.strokeStyle = ctx.fillStyle = this.cornerColor; + if (!this.transparentCorners) { + ctx.strokeStyle = this.cornerStrokeColor; + } this._setLineDash(ctx, this.cornerDashArray, null); // top-left @@ -359,6 +360,9 @@ var size = this.cornerSize; isVML() || this.transparentCorners || ctx.clearRect(left, top, size, size); ctx[methodName](left, top, size, size); + if (!this.transparentCorners && this.cornerStrokeColor) { + ctx.strokeRect(left, top, size, size); + } }, /** diff --git a/src/shapes/object.class.js b/src/shapes/object.class.js index 2154c0ab9a3..4c1d69ab95c 100644 --- a/src/shapes/object.class.js +++ b/src/shapes/object.class.js @@ -455,6 +455,14 @@ */ cornerColor: 'rgba(102,153,255,0.5)', + /** + * Color of controlling corners of an object (when it's active and transparentCorners false) + * @since 1.6.2 + * @type String + * @default + */ + cornerStrokeColor: null, + /** * Array specifying dash pattern of an object's control (hasBorder must be true) * @since 1.6.2