Add method to get a flat array of annotation objects

This commit is contained in:
John Factotum
2023-03-11 22:04:53 +08:00
parent 17ba85b0e5
commit 8ea46671fe
+3
View File
@@ -59,4 +59,7 @@ export class Annotations {
getAnchor(value) { getAnchor(value) {
return this.#anchorsByValue.get(value) return this.#anchorsByValue.get(value)
} }
export() {
return Array.from(this.#annotationsByIndex.values()).flat()
}
} }