annotation_layer.d.ts 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. export type AnnotationElementParameters = {
  2. data: Object;
  3. layer: HTMLDivElement;
  4. page: any;
  5. viewport: any;
  6. linkService: any;
  7. downloadManager: any;
  8. annotationStorage?: AnnotationStorage;
  9. /**
  10. * - Path for image resources, mainly
  11. * for annotation icons. Include trailing slash.
  12. */
  13. imageResourcesPath?: string;
  14. renderInteractiveForms: boolean;
  15. svgFactory: Object;
  16. };
  17. export type AnnotationLayerParameters = {
  18. viewport: any;
  19. div: HTMLDivElement;
  20. annotations: any[];
  21. page: any;
  22. linkService: any;
  23. downloadManager: any;
  24. /**
  25. * - Path for image resources, mainly
  26. * for annotation icons. Include trailing slash.
  27. */
  28. imageResourcesPath?: string;
  29. renderInteractiveForms: boolean;
  30. };
  31. /**
  32. * @typedef {Object} AnnotationLayerParameters
  33. * @property {PageViewport} viewport
  34. * @property {HTMLDivElement} div
  35. * @property {Array} annotations
  36. * @property {PDFPage} page
  37. * @property {IPDFLinkService} linkService
  38. * @property {DownloadManager} downloadManager
  39. * @property {string} [imageResourcesPath] - Path for image resources, mainly
  40. * for annotation icons. Include trailing slash.
  41. * @property {boolean} renderInteractiveForms
  42. */
  43. export class AnnotationLayer {
  44. /**
  45. * Render a new annotation layer with all annotation elements.
  46. *
  47. * @public
  48. * @param {AnnotationLayerParameters} parameters
  49. * @memberof AnnotationLayer
  50. */
  51. public static render(parameters: AnnotationLayerParameters): void;
  52. /**
  53. * Update the annotation elements on existing annotation layer.
  54. *
  55. * @public
  56. * @param {AnnotationLayerParameters} parameters
  57. * @memberof AnnotationLayer
  58. */
  59. public static update(parameters: AnnotationLayerParameters): void;
  60. }
  61. import { AnnotationStorage } from "./annotation_storage.js";