From 9a5292b4673a7e2ab606897c03af6d187ef122a0 Mon Sep 17 00:00:00 2001 From: JFH <20402845+jfhenon@users.noreply.github.com> Date: Thu, 13 May 2021 00:46:46 +0200 Subject: [PATCH] fix missing semicolumns --- .eslintrc.js | 1 + src/editor/Editor.js | 6 +++--- src/editor/EditorStartup.js | 10 +++++----- src/editor/MainMenu.js | 2 +- .../components/jgraduate/jQuery.jPicker.js | 4 ++-- src/editor/dragmove/dragmove.js | 2 +- src/editor/extensions/ext-arrows/ext-arrows.js | 2 +- .../extensions/ext-connector/ext-connector.js | 18 +++++++++--------- .../ext-eyedropper/ext-eyedropper.js | 4 ++-- .../ext-foreignobject/ext-foreignobject.js | 2 +- src/editor/extensions/ext-grid/ext-grid.js | 6 +++--- .../extensions/ext-imagelib/ext-imagelib.js | 14 +++++++------- src/editor/extensions/ext-imagelib/index.js | 2 +- .../extensions/ext-markers/ext-markers.js | 4 ++-- .../ext-overview_window/ext-overview_window.js | 4 ++-- .../extensions/ext-panning/ext-panning.js | 2 +- .../extensions/ext-polygon/ext-polygon.js | 8 ++++---- src/editor/extensions/ext-shapes/ext-shapes.js | 2 +- src/editor/extensions/ext-star/ext-star.js | 8 ++++---- src/editor/panels/BottomPanel.js | 2 +- src/editor/panels/LayersPanel.js | 2 +- src/editor/panels/TopPanel.js | 6 +++--- src/svgcanvas/copy-elem.js | 2 +- src/svgcanvas/path-method.js | 2 +- src/svgcanvas/recalculate.js | 2 +- src/svgcanvas/selected-elem.js | 2 +- src/svgcanvas/utilities.js | 2 +- 27 files changed, 61 insertions(+), 60 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 5792cfa8..681f0768 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -25,6 +25,7 @@ module.exports = { "no-unused-vars": ["error", { "argsIgnorePattern": "^_" }], "sonarjs/cognitive-complexity": ["warn", 40], "sonarjs/no-duplicate-string": 0, + "semi" : "error", }, overrides: [ { diff --git a/src/editor/Editor.js b/src/editor/Editor.js index ed1938f6..c09aa7b2 100644 --- a/src/editor/Editor.js +++ b/src/editor/Editor.js @@ -295,7 +295,7 @@ class Editor extends EditorStartup { '5/Shift+5': 'tools_ellipse' }; Object.entries(keyAssocs).forEach(([keyval, sel]) => { - const parentsElements = this.getParents($id(sel), $id('main_menu')) + const parentsElements = this.getParents($id(sel), $id('main_menu')); const menu = (parentsElements.length); $qa(sel).forEach((element) => { @@ -350,9 +350,9 @@ class Editor extends EditorStartup { const elements = document.getElementsByClassName("tool_button_current"); Array.from(elements).forEach(function (element) { element.classList.add('tool_button_current'); - element.classList.remove('tool_button') + element.classList.remove('tool_button'); }); - $id('tool_select').classList.add('tool_button_current') + $id('tool_select').classList.add('tool_button_current'); $id('tool_select').classList.remove('tool_button'); this.multiselected = false; if (elems.length) { diff --git a/src/editor/EditorStartup.js b/src/editor/EditorStartup.js index fa1b27de..c7c3b453 100644 --- a/src/editor/EditorStartup.js +++ b/src/editor/EditorStartup.js @@ -53,7 +53,7 @@ class EditorStartup { constructor () { this.extensionsAdded = false; this.messageQueue = []; - this.$svgEditor = $id('svg_editor') + this.$svgEditor = $id('svg_editor'); } /** * Auto-run after a Promise microtask. @@ -136,7 +136,7 @@ class EditorStartup { this.selectedElement = null; this.multiselected = false; - const aLinks = $id('cur_context_panel').querySelectorAll('a') + const aLinks = $id('cur_context_panel').querySelectorAll('a'); for (const aLink of aLinks) { aLink.addEventListener('click', (evt) => { @@ -426,16 +426,16 @@ class EditorStartup { Array.from(elements).forEach(function(element) { element.addEventListener('mousedown', function(event) { if (!event.currentTarget.classList.contains('disabled')) { - event.currentTarget.classList.add('push_button_pressed') + event.currentTarget.classList.add('push_button_pressed'); event.currentTarget.classList.remove('push_button'); } }); element.addEventListener('mouseout', function(event) { - event.currentTarget.classList.add('push_button') + event.currentTarget.classList.add('push_button'); event.currentTarget.classList.remove('push_button_pressed'); }); element.addEventListener('mouseup', function(event) { - event.currentTarget.classList.add('push_button') + event.currentTarget.classList.add('push_button'); event.currentTarget.classList.remove('push_button_pressed'); }); }); diff --git a/src/editor/MainMenu.js b/src/editor/MainMenu.js index 856b4791..bb80ecf9 100644 --- a/src/editor/MainMenu.js +++ b/src/editor/MainMenu.js @@ -305,7 +305,7 @@ class MainMenu { init() { // add Top panel const template = document.createElement("template"); - const {i18next} = this.editor + const {i18next} = this.editor; // eslint-disable-next-line no-unsanitized/property template.innerHTML = ` diff --git a/src/editor/components/jgraduate/jQuery.jPicker.js b/src/editor/components/jgraduate/jQuery.jPicker.js index e8226f9f..41da0de5 100755 --- a/src/editor/components/jgraduate/jQuery.jPicker.js +++ b/src/editor/components/jgraduate/jQuery.jPicker.js @@ -1368,7 +1368,7 @@ export function jPickerMethod (elem, options, commitCallback, liveCallback, canc if (!that.querySelectorAll('div.jPicker.Container').length) { document.body.insertBefore(container, document.body.firstChild); } else { - that.querySelector('div.jPicker.Container:last').insertAdjacentElement('afterend', container) + that.querySelector('div.jPicker.Container:last').insertAdjacentElement('afterend', container); } container.addEventListener('mousedown', function () { container.style.zIndex = 20; @@ -1520,7 +1520,7 @@ export function jPickerMethod (elem, options, commitCallback, liveCallback, canc iconAlpha = that.icon.querySelector('.Alpha'); setImg.call(that, iconAlpha, images.clientPath + 'bar-opacity.png'); setAlpha.call(that, iconAlpha, toFixedNumeric(((255 - (!isNullish(all) ? all.a : 0)) * 100) / 255, 4)); - iconImage = that.icon.querySelector('.Image') + iconImage = that.icon.querySelector('.Image'); iconImage.style.backgroundImage = 'url(\'' + images.clientPath + images.picker.file + '\')'; iconImage.addEventListener('click', iconImageClicked); if (win.bindToInput && win.updateInputColor) { diff --git a/src/editor/dragmove/dragmove.js b/src/editor/dragmove/dragmove.js index 64d69da8..38c8566d 100644 --- a/src/editor/dragmove/dragmove.js +++ b/src/editor/dragmove/dragmove.js @@ -92,6 +92,6 @@ export const dragmove = function(target, handler, parent, onStart, onEnd, onDrag target.style.left = lastX + "px"; target.style.top = lastY + "px"; }); -} +}; export { dragmove as default }; \ No newline at end of file diff --git a/src/editor/extensions/ext-arrows/ext-arrows.js b/src/editor/extensions/ext-arrows/ext-arrows.js index 2fa2e451..79105019 100644 --- a/src/editor/extensions/ext-arrows/ext-arrows.js +++ b/src/editor/extensions/ext-arrows/ext-arrows.js @@ -9,7 +9,7 @@ const loadExtensionTranslation = async function (svgEditor) { let translationModule; - const lang = svgEditor.configObj.pref('lang') + const lang = svgEditor.configObj.pref('lang'); try { // eslint-disable-next-line no-unsanitized/method translationModule = await import(`./locale/${encodeURIComponent(lang)}.js`); diff --git a/src/editor/extensions/ext-connector/ext-connector.js b/src/editor/extensions/ext-connector/ext-connector.js index 00c4b1b0..ce9f841d 100644 --- a/src/editor/extensions/ext-connector/ext-connector.js +++ b/src/editor/extensions/ext-connector/ext-connector.js @@ -79,7 +79,7 @@ export default { x: midX + lenX * ratio, y: midY + lenY * ratio }; - } + }; /** * @param {"start"|"end"} side @@ -92,7 +92,7 @@ export default { // TODO: Make this number (5) be based on marker width/height const size = line.getAttribute('stroke-width') * 5; return giveOffset ? size : 0; - } + }; /** * @param {boolean} on @@ -108,7 +108,7 @@ export default { connRules.textContent = (!on ? '' : '#tool_clone, #tool_topath, #tool_angle, #xy_panel { display: none !important; }'); if ($id('connector_panel')) $id('connector_panel').style.display = (on) ? 'block' : 'none'; - } + }; /** * @param {Element} elem @@ -144,7 +144,7 @@ export default { const ptEnd = pts.getItem(pts.numberOfItems - 1); setPoint(elem, 1, (ptEnd.x + ptStart.x) / 2, (ptEnd.y + ptStart.y) / 2); } - } + }; /** * @param {Float} diffX @@ -184,7 +184,7 @@ export default { const pt2 = getBBintersect(pt.x, pt.y, dataStorage.get(line, altPre + '_bb'), getOffset(altPre, line)); setPoint(line, conn.is_start ? 'end' : 0, pt2.x, pt2.y, true); } - } + }; /** * @@ -244,7 +244,7 @@ export default { } } }); - } + }; /** * @param {Element[]} [elems=selElems] @@ -302,7 +302,7 @@ export default { } } } - } + }; // Do once (function () { @@ -347,7 +347,7 @@ export default { svgCanvas.getEditorNS(true); } }); - } + }; const strings = await loadExtensionTranslation(svgEditor.configObj.pref('lang')); return { @@ -359,7 +359,7 @@ export default { const buttonTemplate = document.createElement("template"); buttonTemplate.innerHTML = ` - ` + `; $id('tools_left').append(buttonTemplate.content.cloneNode(true)); $id('mode_connect').addEventListener("click", () => { svgCanvas.setMode('connector'); diff --git a/src/editor/extensions/ext-eyedropper/ext-eyedropper.js b/src/editor/extensions/ext-eyedropper/ext-eyedropper.js index b2fb1526..a2ab0b0c 100644 --- a/src/editor/extensions/ext-eyedropper/ext-eyedropper.js +++ b/src/editor/extensions/ext-eyedropper/ext-eyedropper.js @@ -71,7 +71,7 @@ export default { } else { tool.classList.add('disabled'); } - } + }; return { name: strings.name, @@ -80,7 +80,7 @@ export default { const buttonTemplate = document.createElement("template"); buttonTemplate.innerHTML = ` - ` + `; $id('tools_left').append(buttonTemplate.content.cloneNode(true)); $id('tool_eyedropper').addEventListener("click", () => { svgCanvas.setMode('eyedropper'); diff --git a/src/editor/extensions/ext-foreignobject/ext-foreignobject.js b/src/editor/extensions/ext-foreignobject/ext-foreignobject.js index c0089e4f..2510b252 100644 --- a/src/editor/extensions/ext-foreignobject/ext-foreignobject.js +++ b/src/editor/extensions/ext-foreignobject/ext-foreignobject.js @@ -277,7 +277,7 @@ export default { const attrs = { width: newFO.getAttribute('width'), height: newFO.getAttribute('height'), - } + }; const keep = (attrs.width !== '0' || attrs.height !== '0'); svgCanvas.addToSelection([newFO], true); diff --git a/src/editor/extensions/ext-grid/ext-grid.js b/src/editor/extensions/ext-grid/ext-grid.js index 800f32de..c47944bd 100644 --- a/src/editor/extensions/ext-grid/ext-grid.js +++ b/src/editor/extensions/ext-grid/ext-grid.js @@ -138,7 +138,7 @@ export default { gridimg.parentNode.setAttribute('width', bigInt); gridimg.parentNode.setAttribute('height', bigInt); svgCanvas.setHref(gridimg, datauri); - } + }; /** * @@ -150,7 +150,7 @@ export default { } $id('canvasGrid').style.display = (showGrid) ? 'block' : 'none'; document.getElementById('view_grid').pressed = showGrid; - } + }; return { name: strings.name, zoomChanged (zoom) { @@ -161,7 +161,7 @@ export default { const buttonTemplate = document.createElement("template"); buttonTemplate.innerHTML = ` - ` + `; $id('editor_panel').append(buttonTemplate.content.cloneNode(true)); $id('view_grid').addEventListener("click", () => { svgEditor.configObj.curConfig.showGrid = showGrid = !showGrid; diff --git a/src/editor/extensions/ext-imagelib/ext-imagelib.js b/src/editor/extensions/ext-imagelib/ext-imagelib.js index ab722fc6..bdf0fad2 100644 --- a/src/editor/extensions/ext-imagelib/ext-imagelib.js +++ b/src/editor/extensions/ext-imagelib/ext-imagelib.js @@ -46,7 +46,7 @@ export default { const closeBrowser = () => { $id("imgbrowse_holder").style.display = 'none'; document.activeElement.blur(); // make sure focus is the body to correct issue #417 - } + }; /** * @param {string} url @@ -67,7 +67,7 @@ export default { svgCanvas.clearSelection(); svgCanvas.addToSelection([newImage]); svgCanvas.setImageURL(url); - } + }; const pending = {}; @@ -290,7 +290,7 @@ export default { const img = document.createElement("img"); img.src = curMeta.preview_url; entry.appendChild(img); - entry.appendChild(document.createTextNode(title)) + entry.appendChild(document.createTextNode(title)); } else { entry = document.createElement("img"); entry.src = response; @@ -330,7 +330,7 @@ export default { const insertAfter = (referenceNode, newNode) => { referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling); - } + }; const toggleMultiLoop = () => { multiArr.forEach(function(item, i){ @@ -347,7 +347,7 @@ export default { preview.removeChild(preview.firstChild); multiArr = []; $id("imgbrowse_holder").style.display = 'none'; - } + }; /** * @param {boolean} show @@ -375,7 +375,7 @@ export default { submit.style.display = (show) ? 'block' : 'none'; preview.style.display = (show) ? 'block' : 'none'; - } + }; /** * @@ -496,7 +496,7 @@ export default { } else { $id("imgbrowse_holder").style.display = 'block'; } - } + }; return { svgicons: 'ext-imagelib.xml', diff --git a/src/editor/extensions/ext-imagelib/index.js b/src/editor/extensions/ext-imagelib/index.js index 289ff64e..f6dd5d5f 100644 --- a/src/editor/extensions/ext-imagelib/index.js +++ b/src/editor/extensions/ext-imagelib/index.js @@ -48,5 +48,5 @@ Array.prototype.forEach.call(atags, function (aEle) { }, 'html'); // 'html' is necessary to keep returned data as a string } return false; - }) + }); }); diff --git a/src/editor/extensions/ext-markers/ext-markers.js b/src/editor/extensions/ext-markers/ext-markers.js index b3888525..c944cc19 100644 --- a/src/editor/extensions/ext-markers/ext-markers.js +++ b/src/editor/extensions/ext-markers/ext-markers.js @@ -123,8 +123,8 @@ export default { function setIcon (pos, id) { if (id.substr(0, 1) !== '\\') { id = '\\textmarker'; } const ci = idPrefix + pos + '_' + id.substr(1); - console.log(ci) - console.log('cur_' + pos + '_marker_list') + console.log(ci); + console.log('cur_' + pos + '_marker_list'); svgEditor.setIcon('cur_' + pos + '_marker_list', $id(ci).children); $id(ci).classList.add('current'); const siblings = Array.prototype.filter.call($id(ci).parentNode.children, function(child){ diff --git a/src/editor/extensions/ext-overview_window/ext-overview_window.js b/src/editor/extensions/ext-overview_window/ext-overview_window.js index f7119227..2dd0791c 100644 --- a/src/editor/extensions/ext-overview_window/ext-overview_window.js +++ b/src/editor/extensions/ext-overview_window/ext-overview_window.js @@ -119,12 +119,12 @@ export default { if((el.offsetLeft + el.offsetWidth) > parseFloat(getComputedStyle(parent, null).width.replace("px", ""))){ el.style.left = (parseFloat(getComputedStyle(parent, null).width.replace("px", "")) - el.offsetWidth) + 'px'; } else if(el.offsetLeft < 0){ - el.style.left = "0px" + el.style.left = "0px"; } if((el.offsetTop + el.offsetHeight) > parseFloat(getComputedStyle(parent, null).height.replace("px", ""))){ el.style.top = (parseFloat(getComputedStyle(parent, null).height.replace("px", "")) - el.offsetHeight) + 'px'; } else if(el.offsetTop < 0){ - el.style.top = "0px" + el.style.top = "0px"; } overviewWindowGlobals.viewBoxDragging = false; updateViewPortFromViewBox(); diff --git a/src/editor/extensions/ext-panning/ext-panning.js b/src/editor/extensions/ext-panning/ext-panning.js index 6aca4ac2..3d0c5bf4 100644 --- a/src/editor/extensions/ext-panning/ext-panning.js +++ b/src/editor/extensions/ext-panning/ext-panning.js @@ -36,7 +36,7 @@ export default { } = svgCanvas; const insertAfter = (referenceNode, newNode) => { referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling); - } + }; return { newUI: true, name: strings.name, diff --git a/src/editor/extensions/ext-polygon/ext-polygon.js b/src/editor/extensions/ext-polygon/ext-polygon.js index 18dd7553..c2324469 100644 --- a/src/editor/extensions/ext-polygon/ext-polygon.js +++ b/src/editor/extensions/ext-polygon/ext-polygon.js @@ -36,7 +36,7 @@ export default { */ const showPanel = (on) => { $id('polygon_panel').style.display = (on) ? 'block' : 'none'; - } + }; /** * @param {string} attr @@ -46,7 +46,7 @@ export default { const setAttr = (attr, val) => { svgCanvas.changeSelectedAttribute(attr, val); svgCanvas.call('changed', selElems); - } + }; /** * @param {Float} n @@ -73,7 +73,7 @@ export default { - ` + `; $id('tools_left').append(buttonTemplate.content.cloneNode(true)); } $id('tool_polygon').addEventListener("click", () => { @@ -90,7 +90,7 @@ export default { - ` + `; $id('tools_top').appendChild(panelTemplate.content.cloneNode(true)); $id("polygon_panel").style.display = 'none'; $id("polySides").addEventListener("change", (event) => { diff --git a/src/editor/extensions/ext-shapes/ext-shapes.js b/src/editor/extensions/ext-shapes/ext-shapes.js index 7a12b71f..3627a8f3 100644 --- a/src/editor/extensions/ext-shapes/ext-shapes.js +++ b/src/editor/extensions/ext-shapes/ext-shapes.js @@ -30,7 +30,7 @@ export default { buttonTemplate.innerHTML = ` - ` + `; $id('tools_left').append(buttonTemplate.content.cloneNode(true)); $id('tool_shapelib').addEventListener("click", () => { canv.setMode(modeId); diff --git a/src/editor/extensions/ext-star/ext-star.js b/src/editor/extensions/ext-star/ext-star.js index 4cb41190..6674f492 100644 --- a/src/editor/extensions/ext-star/ext-star.js +++ b/src/editor/extensions/ext-star/ext-star.js @@ -37,7 +37,7 @@ export default { */ const showPanel = (on) => { $id('star_panel').style.display = (on) ? 'block' : 'none'; - } + }; /** * @@ -48,7 +48,7 @@ export default { const setAttr = (attr, val) => { svgCanvas.changeSelectedAttribute(attr, val); svgCanvas.call('changed', selElems); - } + }; return { name: strings.name, @@ -63,7 +63,7 @@ export default { - ` + `; $id('tools_left').append(buttonTemplate.content.cloneNode(true)); } $id('tool_star').addEventListener("click", () => { showPanel(true); @@ -84,7 +84,7 @@ export default { - ` + `; //add handlers for the panel $id('tools_top').appendChild(panelTemplate.content.cloneNode(true)); $id("starNumPoints").addEventListener("change", (event) => { diff --git a/src/editor/panels/BottomPanel.js b/src/editor/panels/BottomPanel.js index 1db52c5d..a4d6051b 100644 --- a/src/editor/panels/BottomPanel.js +++ b/src/editor/panels/BottomPanel.js @@ -217,7 +217,7 @@ class BottomPanel { src="./images/opacity.svg"> - ` + `; this.editor.$svgEditor.append(template.content.cloneNode(true)); $id('palette').addEventListener('change', this.handlePalette.bind(this)); const {curConfig} = this.editor.configObj; diff --git a/src/editor/panels/LayersPanel.js b/src/editor/panels/LayersPanel.js index 33ca3740..50e47f33 100644 --- a/src/editor/panels/LayersPanel.js +++ b/src/editor/panels/LayersPanel.js @@ -79,7 +79,7 @@ class LayersPanel { */ toggleSidePanel(close) { const dpr = window.devicePixelRatio || 1; - const w = parseFloat(getComputedStyle($id("sidepanels"), null).width.replace("px", "")) + const w = parseFloat(getComputedStyle($id("sidepanels"), null).width.replace("px", "")); const isOpened = (dpr < 1 ? w : w / dpr) > 2; const zoomAdjustedSidepanelWidth = (dpr < 1 ? 1 : dpr) * SIDEPANEL_OPENWIDTH; diff --git a/src/editor/panels/TopPanel.js b/src/editor/panels/TopPanel.js index bdbfd5ef..af4cfc72 100644 --- a/src/editor/panels/TopPanel.js +++ b/src/editor/panels/TopPanel.js @@ -352,7 +352,7 @@ class TopPanel { if (this.editor.svgCanvas.addedNew) { // Timeout needed for IE9 setTimeout(() => { - $id("text").focus() + $id("text").focus(); $id("text").select(); }, 100); } @@ -406,7 +406,7 @@ class TopPanel { if ((elem && !isNode) || this.multiselected) { // update the selected elements' layer - $id("selLayerNames").removeAttribute("disabled") + $id("selLayerNames").removeAttribute("disabled"); $id("selLayerNames").value = currentLayerName; // Enable regular menu options @@ -742,7 +742,7 @@ class TopPanel { init() { // add Top panel const template = document.createElement("template"); - const {i18next} = this.editor + const {i18next} = this.editor; // eslint-disable-next-line no-unsanitized/property template.innerHTML = `
diff --git a/src/svgcanvas/copy-elem.js b/src/svgcanvas/copy-elem.js index eba0e54b..25ef28d1 100644 --- a/src/svgcanvas/copy-elem.js +++ b/src/svgcanvas/copy-elem.js @@ -41,7 +41,7 @@ export const copyElem = function (el, getNextId) { }); if (el.dataset.gsvg) { - newEl.dataset.gsvg = newEl.firstChild + newEl.dataset.gsvg = newEl.firstChild; } else if (el.dataset.symbol) { const ref = el.dataset.symbol; newEl.dataset.ref = ref; diff --git a/src/svgcanvas/path-method.js b/src/svgcanvas/path-method.js index cbcbc0b2..7c98c5b3 100644 --- a/src/svgcanvas/path-method.js +++ b/src/svgcanvas/path-method.js @@ -428,7 +428,7 @@ export class Segment { */ selectCtrls (y) { document.getElementById('ctrlpointgrip_' + this.index + 'c1').setAttribute('fill', y ? '#0FF' : '#EEE'); - document.getElementById('ctrlpointgrip_' + this.index + 'c2').setAttribute('fill', y ? '#0FF' : '#EEE') + document.getElementById('ctrlpointgrip_' + this.index + 'c2').setAttribute('fill', y ? '#0FF' : '#EEE'); } /** diff --git a/src/svgcanvas/recalculate.js b/src/svgcanvas/recalculate.js index 468487a3..84a3913e 100644 --- a/src/svgcanvas/recalculate.js +++ b/src/svgcanvas/recalculate.js @@ -707,7 +707,7 @@ export const recalculateDimensions = function (selected) { y1: selected.getAttribute('y1'), x2: selected.getAttribute('x2'), y2: selected.getAttribute('y2'), - } + }; // Fallthrough case 'polyline': case 'polygon': diff --git a/src/svgcanvas/selected-elem.js b/src/svgcanvas/selected-elem.js index 6d849992..6983c44e 100644 --- a/src/svgcanvas/selected-elem.js +++ b/src/svgcanvas/selected-elem.js @@ -733,7 +733,7 @@ export const convertToGroup = function (elem) { recalculateDimensions(elem); elementContext_.call('selected', [elem]); } else if (dataStorage.has($elem, 'symbol')) { - elem = dataStorage.get($elem, 'symbol') + elem = dataStorage.get($elem, 'symbol'); ts = $elem.attr('transform'); const pos = $elem.attr(['x', 'y']); diff --git a/src/svgcanvas/utilities.js b/src/svgcanvas/utilities.js index 18f58d4f..f1e6ad2e 100644 --- a/src/svgcanvas/utilities.js +++ b/src/svgcanvas/utilities.js @@ -1140,7 +1140,7 @@ export const getVisibleElements = function (parentElement) { } const contentElems = []; - const childrens = parentElement.children + const childrens = parentElement.children; Array.prototype.forEach.call(childrens, function (elem) { if (elem.getBBox) { contentElems.push(elem);