@june24/expo-pdf-reader 0.1.4 → 0.1.5

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.
@@ -584,9 +584,17 @@ class ExpoPdfReaderView: ExpoView, UIGestureRecognizerDelegate {
584
584
  }
585
585
 
586
586
  case .ended:
587
- guard let viewPath = currentPath else { return }
587
+ guard let viewPath = currentPath else {
588
+ print("❌ No path to save!")
589
+ return
590
+ }
588
591
  viewPath.addLine(to: viewLocation) // Complete view path
589
592
 
593
+ print("✏️ Pen gesture ended, saving annotation...")
594
+ print(" Tool: \(currentTool)")
595
+ print(" Color: \(currentColor)")
596
+ print(" Stroke width: \(currentStrokeWidth)")
597
+
590
598
  // Remove drawing layer
591
599
  drawingLayer?.removeFromSuperlayer()
592
600
  drawingLayer = nil
@@ -631,8 +639,15 @@ class ExpoPdfReaderView: ExpoView, UIGestureRecognizerDelegate {
631
639
  border.lineWidth = currentStrokeWidth
632
640
  annotation.border = border
633
641
  annotation.add(pagePathForAnnotation)
642
+
643
+ print("✅ Adding pen annotation to page")
644
+ print(" Bounds: \(pathBounds)")
645
+ print(" Paths count: \(annotation.paths?.count ?? 0)")
646
+
634
647
  page.addAnnotation(annotation)
635
648
 
649
+ print(" Total annotations on page: \(page.annotations.count)")
650
+
636
651
  // Force PDF view to update
637
652
  pdfView.setNeedsDisplay()
638
653
  }
@@ -643,8 +658,14 @@ class ExpoPdfReaderView: ExpoView, UIGestureRecognizerDelegate {
643
658
  border.lineWidth = currentStrokeWidth * 3.0
644
659
  annotation.border = border
645
660
  annotation.add(pagePathForAnnotation)
661
+
662
+ print("✅ Adding highlighter annotation to page")
663
+ print(" Bounds: \(pathBounds)")
664
+
646
665
  page.addAnnotation(annotation)
647
666
 
667
+ print(" Total annotations on page: \(page.annotations.count)")
668
+
648
669
  // Force PDF view to update
649
670
  pdfView.setNeedsDisplay()
650
671
  }
@@ -656,8 +677,10 @@ class ExpoPdfReaderView: ExpoView, UIGestureRecognizerDelegate {
656
677
  currentAnnotation = nil
657
678
 
658
679
  // Emit event
680
+ let allAnnotations = getAnnotations()
681
+ print("📤 Emitting annotation change event: \(allAnnotations.count) annotations")
659
682
  onAnnotationChange([
660
- "annotations": getAnnotations()
683
+ "annotations": allAnnotations
661
684
  ])
662
685
 
663
686
  case .cancelled:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@june24/expo-pdf-reader",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "A PDF reader for Expo apps with annotation and zoom controls",
5
5
  "homepage": "git@gitlab.com:june_241/expo-pdf-reader.git",
6
6
  "main": "build/index.js",