#104 extend jquery convert to javascript

This commit is contained in:
Agriya Dev5
2021-05-24 12:38:46 +05:30
parent 78b5ea1010
commit 2a0666aa1c
3 changed files with 4 additions and 4 deletions

View File

@@ -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);
}

View File

@@ -480,7 +480,8 @@ class SvgCanvas {
getSVGRoot,
getStartTransform() { return startTransform; },
setStartTransform(transform) { startTransform = transform; },
getDataStorage
getDataStorage,
getCanvas() { return canvas; },
}
);
this.recalculateDimensions = recalculateDimensions;