Merge pull request #564 from SVG-Edit/issues/555

master
JFH 2021-06-03 12:43:14 +02:00 committed by GitHub
commit 8606934dfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -429,7 +429,7 @@ export default {
const button = document.createElement('button'); const button = document.createElement('button');
// eslint-disable-next-line max-len // eslint-disable-next-line max-len
button.innerHTML = '<img class="svg_icon" src="./images/cancel.svg" alt="icon" width="16" height="16" />' + svgEditor.i18next.t('common.cancel'); button.innerHTML = svgEditor.i18next.t('common.cancel');
browser.appendChild(button); browser.appendChild(button);
button.addEventListener('click', function () { button.addEventListener('click', function () {
$id("imgbrowse_holder").style.display = 'none'; $id("imgbrowse_holder").style.display = 'none';

View File

@ -1,6 +1,7 @@
const atags = document.querySelectorAll('a'); const atags = document.querySelectorAll('a');
Array.prototype.forEach.call(atags, function (aEle) { Array.prototype.forEach.call(atags, function (aEle) {
aEle.addEventListener('click', function (event) { aEle.addEventListener('click', function (event) {
event.preventDefault();
const { href } = event.currentTarget; const { href } = event.currentTarget;
const target = window.parent; const target = window.parent;
const post = (message) => { const post = (message) => {

View File

@ -519,7 +519,7 @@ export const importSvgString = function (xmlString) {
const batchCmd = new BatchCommand('Import Image'); const batchCmd = new BatchCommand('Import Image');
let symbol; let symbol;
if (useExisting) { if (useExisting) {
({ symbol } = svgContext_.getImportIds()); symbol = svgContext_.getImportIds(uid).symbol;
ts = svgContext_.getImportIds(uid).xform; ts = svgContext_.getImportIds(uid).xform;
} else { } else {
// convert string into XML document // convert string into XML document