diff --git a/src/svgcanvas/selection.js b/src/svgcanvas/selection.js index 8c38387b..d69d0cb1 100644 --- a/src/svgcanvas/selection.js +++ b/src/svgcanvas/selection.js @@ -48,7 +48,7 @@ export const clearSelectionMethod = function (noCall) { svgCanvas.selectorManager.releaseSelector(elem); }); - svgCanvas.setEmptySelectedElements; + svgCanvas.setEmptySelectedElements(); if (!noCall) { svgCanvas.call("selected", selectedElements); diff --git a/src/svgcanvas/svgcanvas.js b/src/svgcanvas/svgcanvas.js index 93b32972..f2e04aa6 100644 --- a/src/svgcanvas/svgcanvas.js +++ b/src/svgcanvas/svgcanvas.js @@ -401,14 +401,12 @@ class SvgCanvas { * @name module:svgcanvas.SvgCanvas#getSelectedElements * @type {module:utilities.EditorContext#getSelectedElements|module:draw.DrawCanvasInit#getSelectedElements|module:path.EditorContext#getSelectedElements} */ - const getSelectedElements = this.getSelectedElems = function () { - return selectedElements; - }; + const getSelectedElements = this.getSelectedElems = () => ( selectedElements ); - this.setSelectedElements = function (key, value) { + this.setSelectedElements = (key, value) => { selectedElements[key] = value; }; - this.setEmptySelectedElements = function () { + this.setEmptySelectedElements = () => { selectedElements = []; };