initialPdfState.ts 857 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import {
  2. ProgressType,
  3. ViewportType,
  4. AnnotationType,
  5. WatermarkType,
  6. } from '../constants/type';
  7. import { color as theme } from '../constants/style';
  8. export type StateType = {
  9. totalPage: number;
  10. currentPage: number;
  11. pdf: any;
  12. progress: ProgressType;
  13. viewport: ViewportType;
  14. scale: number;
  15. rotation: number;
  16. annotations: AnnotationType[];
  17. isInit: boolean;
  18. watermark: WatermarkType;
  19. };
  20. export default {
  21. totalPage: 1,
  22. currentPage: 1,
  23. pdf: null,
  24. progress: {
  25. loaded: 0,
  26. total: 1,
  27. },
  28. viewport: {},
  29. scale: 1,
  30. rotation: 0,
  31. annotations: [],
  32. isInit: false,
  33. watermark: {
  34. type: 'text',
  35. textcolor: theme.gray,
  36. opacity: 0.5,
  37. text: '',
  38. scale: 1,
  39. rotation: 0,
  40. vertalign: 'center',
  41. horizalign: 'center',
  42. xoffset: 0,
  43. yoffset: 0,
  44. imagepath: '',
  45. isfront: 'yes',
  46. },
  47. };