fix(chore): make svgedit less intrusive by adding components in its div instead of document.body.

This commit is contained in:
JFH
2021-08-04 11:24:47 +02:00
parent ee6bda3c5c
commit b048afb72e
6 changed files with 13 additions and 13 deletions

View File

@@ -149,13 +149,13 @@ class LayersPanel {
menuMore.setAttribute("id", "se-cmenu-layers-more");
menuMore.value = "layer_moreopts";
menuMore.setAttribute("leftclick", true);
document.body.append(menuMore);
this.editor.$svgEditor.append(menuMore);
menuMore.init(i18next);
const menuLayerBox = document.createElement("se-cmenu-layers");
menuLayerBox.setAttribute("id", "se-cmenu-layers-list");
menuLayerBox.value = "layerlist";
menuLayerBox.setAttribute("leftclick", false);
document.body.append(menuLayerBox);
this.editor.$svgEditor.append(menuLayerBox);
menuLayerBox.init(i18next);
document
.getElementById("layer_new")

View File

@@ -996,7 +996,7 @@ class TopPanel {
"se-svg-source-editor-dialog"
);
newSeEditorDialog.setAttribute("id", "se-svg-editor-dialog");
document.body.append(newSeEditorDialog);
this.editor.$svgEditor.append(newSeEditorDialog);
newSeEditorDialog.init(i18next);
// register action to top panel buttons
$id("tool_source").addEventListener(