Run validation upon data restore after page reload

This commit is contained in:
Quincy Morgan
2019-01-30 13:40:02 -05:00
parent 19a2a60bf4
commit 5b93ee0f7a
2 changed files with 6 additions and 1 deletions
+4
View File
@@ -459,6 +459,10 @@ export function coreContext() {
issueManager = IssueManager(context);
// run validation upon restoring from page reload
history.on('restore', function() {
issueManager.validate();
});
// re-run validation upon a significant graph change
history.on('annotatedChange', function(difference) {
if (difference) {
+2 -1
View File
@@ -32,7 +32,7 @@ import {
export function coreHistory(context) {
var dispatch = d3_dispatch('change', 'annotatedChange', 'merge', 'undone', 'redone');
var dispatch = d3_dispatch('change', 'annotatedChange', 'merge', 'restore', 'undone', 'redone');
var lock = utilSessionMutex('lock');
var duration = 150;
var _imageryUsed = [];
@@ -625,6 +625,7 @@ export function coreHistory(context) {
var json = context.storage(getKey('saved_history'));
if (json) history.fromJSON(json, true);
dispatch.call('restore', this);
},