@june24/expo-pdf-reader 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -464,7 +464,11 @@ class ExpoPdfReaderView: ExpoView, UIGestureRecognizerDelegate {
|
|
|
464
464
|
// Clear all existing annotations first
|
|
465
465
|
for i in 0..<document.pageCount {
|
|
466
466
|
guard let page = document.page(at: i) else { continue }
|
|
467
|
-
|
|
467
|
+
// Remove annotations one by one (annotations is read-only)
|
|
468
|
+
let annotationsToRemove = page.annotations
|
|
469
|
+
for annotation in annotationsToRemove {
|
|
470
|
+
page.removeAnnotation(annotation)
|
|
471
|
+
}
|
|
468
472
|
}
|
|
469
473
|
|
|
470
474
|
// Clear undo/redo stacks when setting annotations
|
package/package.json
CHANGED