listen for map changes
This commit is contained in:
@@ -19,11 +19,6 @@ export class AnnotationState {
|
||||
|
||||
constructor(options: AnnotationStateOptions) {
|
||||
this.options = options
|
||||
|
||||
// TODO: Observe Y.js changes and re-render decorations
|
||||
// this.options.map.observe(e => {
|
||||
// console.log('e', e)
|
||||
// })
|
||||
}
|
||||
|
||||
findAnnotation(id: string) {
|
||||
@@ -113,6 +108,12 @@ export class AnnotationState {
|
||||
this.deleteAnnotation(action.id)
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
if (action.type === 'updateAnnotations') {
|
||||
console.log('updateAnnotations!')
|
||||
this.updateDecorations(state)
|
||||
}
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user