diff --git a/src/editor/ConfigObj.js b/src/editor/ConfigObj.js index 72bd5636..94c7c238 100644 --- a/src/editor/ConfigObj.js +++ b/src/editor/ConfigObj.js @@ -402,7 +402,6 @@ export default class ConfigObj { */ const extendOrAdd = (cfgObj, key, val) => { if (cfgObj[key] && typeof cfgObj[key] === 'object') { - // $.extend(true, cfgObj[key], val); cfgObj[key] = mergeDeep(cfgObj[key], val); } else { cfgObj[key] = val; @@ -452,7 +451,6 @@ export default class ConfigObj { } else if (this.defaultConfig[key] && typeof this.defaultConfig[key] === 'object') { this.curConfig[key] = Array.isArray(this.defaultConfig[key]) ? [] : {}; this.curConfig[key] = mergeDeep(this.curConfig[key], val); - // $.extend(true, this.curConfig[key], val); // Merge properties recursively, e.g., on initFill, initStroke objects } else { this.curConfig[key] = val; } diff --git a/src/svgcanvas/recalculate.js b/src/svgcanvas/recalculate.js index 815e8254..796c3927 100644 --- a/src/svgcanvas/recalculate.js +++ b/src/svgcanvas/recalculate.js @@ -239,7 +239,8 @@ export const recalculateDimensions = function (selected) { // if we haven't created an initial array in polygon/polyline/path, then // make a copy of initial values and include the transform if (isNullish(initial)) { - initial = $.extend(true, {}, changes); + const canvas = context_.getCanvas(); + initial = canvas.mergeDeep({}, changes); for (const [ attr, val ] of Object.entries(initial)) { initial[attr] = convertToNum(attr, val); } diff --git a/src/svgcanvas/svgcanvas.js b/src/svgcanvas/svgcanvas.js index a77639f0..dc82a15f 100644 --- a/src/svgcanvas/svgcanvas.js +++ b/src/svgcanvas/svgcanvas.js @@ -480,7 +480,8 @@ class SvgCanvas { getSVGRoot, getStartTransform() { return startTransform; }, setStartTransform(transform) { startTransform = transform; }, - getDataStorage + getDataStorage, + getCanvas() { return canvas; }, } ); this.recalculateDimensions = recalculateDimensions;