#issue_fix double click and opensvg issue fixed
parent
62d63b3efd
commit
b173b6c2f7
|
@ -111,7 +111,7 @@ export class SeMenu extends HTMLElement {
|
|||
* @function connectedCallback
|
||||
* @returns {void}
|
||||
*/
|
||||
connectedCallback () {
|
||||
/* connectedCallback () {
|
||||
this.$menu.addEventListener('openedchange', (e) => {
|
||||
e.preventDefault();
|
||||
const selectedItem = e?.detail?.closeResult;
|
||||
|
@ -119,7 +119,7 @@ export class SeMenu extends HTMLElement {
|
|||
document.getElementById(selectedItem.id).click();
|
||||
}
|
||||
});
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
// Register
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// eslint-disable-next-line node/no-unpublished-import
|
||||
import AlertDialog from 'elix/define/AlertDialog.js';
|
||||
|
||||
const dialog = new AlertDialog();
|
||||
const seConfirm = async (text, choices) => {
|
||||
const dialog = new AlertDialog();
|
||||
dialog.textContent = text;
|
||||
dialog.choices = (choices === undefined) ? ['Ok', 'Cancel'] : choices;
|
||||
dialog.open();
|
||||
|
|
|
@ -54,7 +54,7 @@ export default {
|
|||
},
|
||||
async open () {
|
||||
const ok = await this.openPrep();
|
||||
if (!ok) { return; }
|
||||
if (ok === 'Cancel') { return; }
|
||||
this.svgCanvas.clear();
|
||||
const input = document.createElement('input');
|
||||
input.type = 'file';
|
||||
|
|
|
@ -1398,12 +1398,12 @@ class Editor extends EditorStartup {
|
|||
* @returns {boolean|Promise<boolean>} Resolves to boolean indicating `true` if there were no changes
|
||||
* and `false` after the user confirms.
|
||||
*/
|
||||
openPrep () {
|
||||
async openPrep () {
|
||||
$('#main_menu').hide();
|
||||
if (this.svgCanvas.undoMgr.getUndoStackSize() === 0) {
|
||||
return true;
|
||||
}
|
||||
return seConfirm(this.uiStrings.notification.QwantToOpen);
|
||||
return await seConfirm(this.uiStrings.notification.QwantToOpen);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue