Skip to content

Commit

Permalink
Update eraser_brush.mixin.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaMan123 committed Apr 26, 2021
1 parent 63d76d5 commit 99279a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mixins/eraser_brush.mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,18 @@
var colorPropKey = layer + 'Color';
var erasable = (options && options.erasable) || false;
var target = this[colorPropKey];
if (typeof target === 'object' && target.isType('rect')) {
if (typeof target === 'object' && target.isType && target.isType('rect')) {
//this.__setBgOverlayColor(colorPropKey, color, callback);
target.set({
fill: color,
erasable: erasable
});
} else {
this.__setBgOverlayColor(colorPropKey, color, callback);
this[colorPropKey + 'Erasable'] = erasable;
if (typeof target === 'object') {
target.erasable = erasable;
}
}
return this;
},
Expand Down

0 comments on commit 99279a7

Please sign in to comment.