From 231c98da3cfd042dc63f08484d5caf7ea713d339 Mon Sep 17 00:00:00 2001 From: DD Liu Date: Wed, 29 Jan 2020 11:59:22 -0500 Subject: [PATCH] Only load anchorIcon if it doesn't exist --- .../selection-tools/bounding-box-tool.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/helper/selection-tools/bounding-box-tool.js b/src/helper/selection-tools/bounding-box-tool.js index b9db8dde..b78f838c 100644 --- a/src/helper/selection-tools/bounding-box-tool.js +++ b/src/helper/selection-tools/bounding-box-tool.js @@ -57,14 +57,16 @@ class BoundingBoxTool { new MoveTool(mode, setSelectedItems, clearSelectedItems, onUpdateImage, switchToTextTool); this._currentCursor = null; - paper.project.importSVG(selectionAnchorIcon, { - onLoad: function (item) { - anchorIcon = item; - item.visible = false; - item.parent = getGuideLayer(); - setGuideItem(item); - } - }); + if (!anchorIcon) { + paper.project.importSVG(selectionAnchorIcon, { + onLoad: function (item) { + anchorIcon = item; + item.visible = false; + item.parent = getGuideLayer(); + setGuideItem(item); + } + }); + } } /**