Path Box widely supported, Replace/Insert in Path are deprecated (but polyfilled)

This commit is contained in:
JFH
2021-09-20 08:24:18 +02:00
parent e8d59904f7
commit e92ccd0444
7 changed files with 10 additions and 157 deletions

View File

@@ -365,7 +365,8 @@ class Editor extends EditorStartup {
const { workarea } = this;
const cnvs = $id("svgcanvas");
let w = parseFloat(getComputedStyle(workarea, null).width.replace("px", "")); let h = parseFloat(getComputedStyle(workarea, null).height.replace("px", ""));
let w = parseFloat(getComputedStyle(workarea, null).width.replace("px", ""));
let h = parseFloat(getComputedStyle(workarea, null).height.replace("px", ""));
const wOrig = w; const hOrig = h;
const oldCtr = {
x: workarea.scrollLeft + wOrig / 2,

View File

@@ -48,8 +48,7 @@ Array.prototype.forEach.call(atags, function (aEle) {
post({ href, data });
return data;
})
// eslint-disable-next-line no-console
.catch( (error) => console.log(error));
.catch( (error) => console.error(error));
}
return false;
});

View File

@@ -782,8 +782,7 @@ class TopPanel {
editor.svgCanvas.setMode('select');
editor.svgCanvas.selectOnly(editor.svgCanvas.getSelectedElems(), true);
}, (error) => {
// eslint-disable-next-line no-console
console.log("error =", error);
console.error("error =", error);
seAlert(editor.i18next.t('tools.no_embed'));
editor.svgCanvas.deleteSelectedElements();
});