mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 03:51:23 +01:00
Added a function to refresh all open editors
This commit is contained in:
parent
03443a9182
commit
d83e327036
1 changed files with 13 additions and 0 deletions
|
|
@ -631,3 +631,16 @@ function selectIcon(initial, callback) {
|
|||
Close: function() {callback(initial); $(this).dialog("close")}}
|
||||
});
|
||||
}
|
||||
|
||||
// Calls the refresh functionality on all editors currently open.
|
||||
function refreshAllEditors() {
|
||||
console.time('refreshAllEditors');
|
||||
if (document.getElementById('culturesEditorRefresh').offsetParent) culturesEditorRefresh.click();
|
||||
if (document.getElementById('biomesEditorRefresh').offsetParent) biomesEditorRefresh.click();
|
||||
if (document.getElementById('diplomacyEditorRefresh').offsetParent) diplomacyEditorRefresh.click();
|
||||
if (document.getElementById('provincesEditorRefresh').offsetParent) provincesEditorRefresh.click();
|
||||
if (document.getElementById('religionsEditorRefresh').offsetParent) religionsEditorRefresh.click();
|
||||
if (document.getElementById('statesEditorRefresh').offsetParent) statesEditorRefresh.click();
|
||||
if (document.getElementById('zonesEditorRefresh').offsetParent) zonesEditorRefresh.click();
|
||||
console.timeEnd('refreshAllEditors');
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue