|
1 | 1 | <script lang="ts">
|
2 |
| - import { onDestroy, onMount, tick } from 'svelte'; |
3 |
| - import { |
4 |
| - addDrawingPath, |
5 |
| - arrowAnnotations, |
6 |
| - currentPageArrowAnnotations, |
7 |
| - currentPagePaths, |
8 |
| - currentPageStampAnnotations, |
9 |
| - currentPageStickyNotes, |
10 |
| - currentPageTextAnnotations, |
11 |
| - type DrawingPath, |
12 |
| - drawingPaths, |
13 |
| - drawingState, |
14 |
| - getStampById, |
15 |
| - pdfState, |
16 |
| - type Point, |
17 |
| - stampAnnotations, |
18 |
| - stickyNoteAnnotations, |
19 |
| - textAnnotations |
20 |
| - } from '../stores/drawingStore'; |
21 |
| - import { PDFManager } from '../utils/pdfUtils'; |
22 |
| - import { DrawingEngine } from '../utils/drawingUtils'; |
23 |
| - import { toastStore } from '../stores/toastStore'; |
24 |
| - import TextOverlay from './TextOverlay.svelte'; |
25 |
| - import StickyNoteOverlay from './StickyNoteOverlay.svelte'; |
26 |
| - import StampOverlay from './StampOverlay.svelte'; |
27 |
| - import ArrowOverlay from './ArrowOverlay.svelte'; |
28 |
| - import { TOOLBAR_HEIGHT } from '$lib/constants'; |
29 |
| -
|
30 |
| - // Helper function to convert SVG string to image |
| 2 | + import { onDestroy, onMount, tick } from 'svelte'; |
| 3 | + import { |
| 4 | + addDrawingPath, |
| 5 | + arrowAnnotations, |
| 6 | + currentPageArrowAnnotations, |
| 7 | + currentPagePaths, |
| 8 | + currentPageStampAnnotations, |
| 9 | + currentPageStickyNotes, |
| 10 | + currentPageTextAnnotations, |
| 11 | + type DrawingPath, |
| 12 | + drawingPaths, |
| 13 | + drawingState, |
| 14 | + getStampById, |
| 15 | + pdfState, |
| 16 | + type Point, |
| 17 | + stampAnnotations, |
| 18 | + stickyNoteAnnotations, |
| 19 | + textAnnotations |
| 20 | + } from '../stores/drawingStore'; |
| 21 | + import { PDFManager } from '../utils/pdfUtils'; |
| 22 | + import { DrawingEngine } from '../utils/drawingUtils'; |
| 23 | + import { toastStore } from '../stores/toastStore'; |
| 24 | + import TextOverlay from './TextOverlay.svelte'; |
| 25 | + import StickyNoteOverlay from './StickyNoteOverlay.svelte'; |
| 26 | + import StampOverlay from './StampOverlay.svelte'; |
| 27 | + import ArrowOverlay from './ArrowOverlay.svelte'; |
| 28 | + import { TOOLBAR_HEIGHT } from '$lib/constants'; |
| 29 | +
|
| 30 | + // Helper function to convert SVG string to image |
31 | 31 | async function svgToImage(svgString: string, width: number, height: number): Promise<HTMLImageElement> {
|
32 | 32 | return new Promise((resolve, reject) => {
|
33 | 33 | const img = new Image();
|
|
0 commit comments