From 99279a70b4a892e805b233dc5d924adf197d6933 Mon Sep 17 00:00:00 2001 From: ShaMan123 Date: Tue, 27 Apr 2021 00:35:10 +0300 Subject: [PATCH] Update eraser_brush.mixin.js --- src/mixins/eraser_brush.mixin.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mixins/eraser_brush.mixin.js b/src/mixins/eraser_brush.mixin.js index a887256bc38..6eaf682218b 100644 --- a/src/mixins/eraser_brush.mixin.js +++ b/src/mixins/eraser_brush.mixin.js @@ -45,7 +45,8 @@ 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 @@ -53,6 +54,9 @@ } else { this.__setBgOverlayColor(colorPropKey, color, callback); this[colorPropKey + 'Erasable'] = erasable; + if (typeof target === 'object') { + target.erasable = erasable; + } } return this; },