From 8ea46671fe70c584a8b6542a013bda20708e703b Mon Sep 17 00:00:00 2001 From: John Factotum <50942278+johnfactotum@users.noreply.github.com> Date: Sat, 11 Mar 2023 22:04:53 +0800 Subject: [PATCH] Add method to get a flat array of annotation objects --- annotations.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/annotations.js b/annotations.js index 3d92795..dc9a638 100644 --- a/annotations.js +++ b/annotations.js @@ -59,4 +59,7 @@ export class Annotations { getAnchor(value) { return this.#anchorsByValue.get(value) } + export() { + return Array.from(this.#annotationsByIndex.values()).flat() + } }