image folder variable used consistently

This commit is contained in:
JFH
2021-08-11 10:16:00 +02:00
parent 4557d338c1
commit 86c0e9cf03
26 changed files with 136 additions and 501 deletions

View File

@@ -34,6 +34,7 @@ export default {
name,
async init ({ _importLocale }) {
const svgEditor = this;
const { imgPath } = svgEditor.configObj.curConfig;
await loadExtensionTranslation(svgEditor);
const { svgCanvas } = svgEditor;
const { $id } = svgCanvas;
@@ -45,7 +46,7 @@ export default {
const title = svgEditor.i18next.t(`${name}:buttons.0.title`);
// eslint-disable-next-line no-unsanitized/property
buttonTemplate.innerHTML = `
<se-button id="hello_world" title="${title}" src="./images/hello_world.svg"></se-button>
<se-button id="hello_world" title="${title}" src="${imgPath}/hello_world.svg"></se-button>
`;
$id('tools_left').append(buttonTemplate.content.cloneNode(true));
$id('hello_world').addEventListener("click", () => {