This commit is contained in:
Philipp Kühn
2021-02-11 23:25:25 +01:00
7 changed files with 87 additions and 161 deletions

View File

@@ -19,9 +19,17 @@ 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: number) {
// TODO: Get from Y.js?
// this.decorations.get(id)
const current = this.decorations.find()
for (let i = 0; i < current.length; i += 1) {