Further development of split-road feature; refactoring of change-handling

This commit is contained in:
Pieter Vander Vennet 2021-07-15 20:47:28 +02:00
parent dc4cdda3b5
commit 96ecded0b9
37 changed files with 967 additions and 568 deletions

View file

@ -9,7 +9,7 @@ export default class PendingChangesUploader {
constructor(changes: Changes, selectedFeature: UIEventSource<any>) {
const self = this;
this.lastChange = new Date();
changes.pending.addCallback(() => {
changes.pendingChanges.addCallback(() => {
self.lastChange = new Date();
window.setTimeout(() => {
@ -54,7 +54,7 @@ export default class PendingChangesUploader {
function onunload(e) {
if (changes.pending.data.length == 0) {
if(changes.pendingChanges.data.length == 0){
return;
}
changes.flushChanges("onbeforeunload - probably closing or something similar");