Only load anchorIcon if it doesn't exist

This commit is contained in:
DD Liu 2020-01-29 11:59:22 -05:00
parent 9e097ea8c8
commit 231c98da3c

View file

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