#326 unpositioned extension button in wrong place

This commit is contained in:
agriyadev5
2021-07-23 12:46:55 +05:30
parent 83632b65d9
commit 3bce54b3db
7 changed files with 80 additions and 36 deletions

View File

@@ -79,9 +79,8 @@ export default {
const fbtitle = svgEditor.i18next.t(`${name}:title`);
const title_star = svgEditor.i18next.t(`${name}:buttons.0.title`);
const title_polygon = svgEditor.i18next.t(`${name}:buttons.1.title`);
const buttonTemplate = document.createElement("template");
// eslint-disable-next-line no-unsanitized/property
buttonTemplate.innerHTML = `
const buttonTemplate = `
<se-flyingbutton id="tools_polygon" title="${fbtitle}">
<se-button id="tool_star" title="${title_star}" src="./images/star.svg">
</se-button>
@@ -89,7 +88,7 @@ export default {
</se-button>
</se-flyingbutton>
`;
$id("tools_left").append(buttonTemplate.content.cloneNode(true));
svgCanvas.insertChildAtIndex($id('tools_left'), buttonTemplate, 10);
// handler
$id("tool_star").addEventListener("click", () => {
if (this.leftPanel.updateLeftPanel("tool_star")) {