Refactoring: fix delete indication, fix splitroad, fix addition of multiple new points snapped onto the same way (all will properly attach now)

This commit is contained in:
Pieter Vander Vennet 2023-04-20 17:42:07 +02:00
parent 1f9aacfb29
commit 4172af6a72
118 changed files with 1422 additions and 1357 deletions

View file

@ -244,8 +244,9 @@ export abstract class Store<T> implements Readable<T> {
const self = this
condition = condition ?? ((t) => t !== undefined)
return new Promise((resolve) => {
if (condition(self.data)) {
resolve(self.data)
const data = self.data
if (condition(data)) {
resolve(data)
} else {
self.addCallbackD((data) => {
resolve(data)