mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
feat(charts): remove on dialog close
This commit is contained in:
parent
eded296b47
commit
6cd2419f10
8 changed files with 90 additions and 56 deletions
|
|
@ -49,11 +49,13 @@ function unselect() {
|
|||
|
||||
// close all dialogs except stated
|
||||
function closeDialogs(except = "#except") {
|
||||
$(".dialog:visible")
|
||||
.not(except)
|
||||
.each(function () {
|
||||
$(this).dialog("close");
|
||||
});
|
||||
try {
|
||||
$(".dialog:visible")
|
||||
.not(except)
|
||||
.each(function () {
|
||||
$(this).dialog("close");
|
||||
});
|
||||
} catch (error) {}
|
||||
}
|
||||
|
||||
// move brush radius circle
|
||||
|
|
@ -1155,7 +1157,7 @@ function confirmationDialog(options) {
|
|||
// add and register event listeners to clean up on editor closure
|
||||
function listen(element, event, handler) {
|
||||
element.on(event, handler);
|
||||
return () => element.removeEventListener(event, handler);
|
||||
return () => element.off(event, handler);
|
||||
}
|
||||
|
||||
// Calls the refresh functionality on all editors currently open.
|
||||
|
|
@ -1180,12 +1182,12 @@ async function editStates() {
|
|||
|
||||
async function editCultures() {
|
||||
if (customization) return;
|
||||
const Editor = await import("../dynamic/editors/cultures-editor.js?v=1.87.00");
|
||||
const Editor = await import("../dynamic/editors/cultures-editor.js?v=1.87.01");
|
||||
Editor.open();
|
||||
}
|
||||
|
||||
async function editReligions() {
|
||||
if (customization) return;
|
||||
const Editor = await import("../dynamic/editors/religions-editor.js?v=1.87.00");
|
||||
const Editor = await import("../dynamic/editors/religions-editor.js?v=1.87.01");
|
||||
Editor.open();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue