- Breaking change: Remove storagePromptClosed state boolean in favor of
`storagePromptState`; used by `ext-storage.js`
- Fix (regression): Ensure storage dialog will not be blocked because of
canvas updating done for sake of centering background
- Fix (extensions): Ensure `langReady` changes are available by time prefs
dialog is closed and that its changes have occurred by time extensions
have first loaded (`setLang` now returns a Promise rather than `undefined`
as it waits for extension's `langReady` to resolve); this is also useful
with `ext-storage.js` so we know that `extensions_loaded` (which
conditionally updates the canvas based on `storagePromptState`) has seen
`langReady` and the storage extension hasn't set a `storagePromptState`
of "waiting"
This commit is contained in:
@@ -47,7 +47,7 @@ export default {
|
||||
noStorageOnLoad,
|
||||
forceStorage
|
||||
} = svgEditor.curConfig;
|
||||
const {storage} = svgEditor;
|
||||
const {storage, updateCanvas} = svgEditor;
|
||||
|
||||
function replaceStoragePrompt (val) {
|
||||
val = val ? 'storagePrompt=' + val : '';
|
||||
@@ -255,7 +255,8 @@ export default {
|
||||
// the prompt gives the user the option to store data
|
||||
setupBeforeUnloadListener();
|
||||
|
||||
svgEditor.storagePromptClosed = true;
|
||||
svgEditor.storagePromptState = 'closed';
|
||||
updateCanvas(true);
|
||||
},
|
||||
null,
|
||||
null,
|
||||
@@ -265,6 +266,7 @@ export default {
|
||||
tooltip: rememberTooltip
|
||||
}
|
||||
);
|
||||
svgEditor.storagePromptState = 'waiting';
|
||||
} else if (!noStorageOnLoad || forceStorage) {
|
||||
setupBeforeUnloadListener();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user