mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
fix: use real redraw for datalayer, instead of hide/show
The problem we've tried to fix is, during sync: - peer A is editing a feature - peer B changes the datalayer of this feature - edit panel is closed for peer A Co-authored-by: Alexis Métaireau <alexis@notmyidea.org>
This commit is contained in:
parent
d85fc648b1
commit
0c9d5325ba
1 changed files with 2 additions and 4 deletions
|
@ -144,11 +144,10 @@ export class DataLayer extends ServerStored {
|
|||
if (fields.includes('options.type')) {
|
||||
this.resetLayer()
|
||||
}
|
||||
this.hide()
|
||||
for (const field of fields) {
|
||||
this.layer.onEdit(field, builder)
|
||||
}
|
||||
this.show()
|
||||
this.redraw()
|
||||
break
|
||||
case 'remote-data':
|
||||
this.fetchRemoteData()
|
||||
|
@ -652,8 +651,7 @@ export class DataLayer extends ServerStored {
|
|||
|
||||
redraw() {
|
||||
if (!this.isVisible()) return
|
||||
this.hide()
|
||||
this.show()
|
||||
this.eachFeature((feature) => feature.redraw())
|
||||
}
|
||||
|
||||
edit() {
|
||||
|
|
Loading…
Reference in a new issue