fix: use real redraw for datalayer, instead of hide/show (#2568)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run

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
This commit is contained in:
Yohan Boniface 2025-03-12 17:41:18 +01:00 committed by GitHub
commit 05e3f5ce3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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() {