fix issue with import lib

This commit is contained in:
JFH
2021-08-09 17:34:38 +02:00
parent f9dacb85c0
commit c3c1c37cb6
2 changed files with 14 additions and 13 deletions

View File

@@ -31,6 +31,7 @@ export default {
async init({ decode64, dropXMLInternalSubset }) {
const svgEditor = this;
const { $id } = svgEditor.svgCanvas;
const { $svgEditor } = svgEditor;
await loadExtensionTranslation(svgEditor);
const { svgCanvas } = svgEditor;
@@ -405,7 +406,7 @@ export default {
const div = document.createElement('div');
div.id = 'imgbrowse_holder';
div.innerHTML = '<div id=imgbrowse class=toolbar_button></div>';
insertAfter($id('svg_editor'), div);
insertAfter($svgEditor, div);
browser = $id('imgbrowse');
const allLibs = svgEditor.i18next.t(`${name}:select_lib`);

View File

@@ -1,22 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>-</title>
<link rel="icon" type="image/png" href="../../images/logo.svg" />
<!-- Lacking browser support -->
<script nomodule="" src="../../redirect-on-no-module-support.js"></script>
<script type="module" src="../../redirect-on-lacking-support.js"></script>
<script type="module" src="index.js"></script>
</head>
<body>
<h1>Select an image:</h1>
<a href="smiley.svg">smiley.svg</a>
<br/>
<a href="../../images/logo.svg">logo.svg</a>
<h1>Select an image:</h1>
<a href="smiley.svg">
<img src="smiley.svg" width="48" height="48" alt="smiley.svg" />
</a>
<br />
<a href="../../images/logo.svg">
<img src="../../images/logo.svg" width="48" height="48" alt="logo.svg" />
</a>
</body>
</html>
</html>