Aucune description

toolbar-items.js 2.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var index_1 = require("./../markers/RectMarker/index");
  4. var index_2 = require("./../markers/CoverMarker/index");
  5. var index_3 = require("./../markers/TextMarker/index");
  6. var index_4 = require("./../markers/ArrowMarker/index");
  7. var index_5 = require("./../markers/HighlightMarker/index");
  8. var ToolbarItem_1 = require("./ToolbarItem");
  9. var LineMarker_1 = require("../markers/LineMarker");
  10. var OkIcon = require('../assets/check.svg');
  11. var DeleteIcon = require('../assets/eraser.svg');
  12. var PointerIcon = require('../assets/mouse-pointer.svg');
  13. var CloseIcon = require('../assets/times.svg');
  14. exports.highlightMarkerToolbarItem = new ToolbarItem_1.ToolbarItem({
  15. name: 'cover-marker',
  16. tooltipText: 'Cover',
  17. icon: require('../assets/highlight.svg'),
  18. markerType: index_5.HighlightMarker
  19. });
  20. exports.arrowMarkerToolbarItem = new ToolbarItem_1.ToolbarItem({
  21. name: 'arrow-marker',
  22. tooltipText: 'Arrow',
  23. icon: require('../assets/arrow.svg'),
  24. markerType: index_4.ArrowMarker
  25. });
  26. exports.textMarkerToolbarItem = new ToolbarItem_1.ToolbarItem({
  27. name: 'text-marker',
  28. tooltipText: 'Text',
  29. icon: require('../assets/text.svg'),
  30. markerType: index_3.TextMarker
  31. });
  32. exports.coverMarkerToolbarItem = new ToolbarItem_1.ToolbarItem({
  33. name: 'cover-marker',
  34. tooltipText: 'Cover',
  35. icon: require('../assets/cover.svg'),
  36. markerType: index_2.CoverMarker
  37. });
  38. exports.rectMarkerToolbarItem = new ToolbarItem_1.ToolbarItem({
  39. name: 'rect-marker',
  40. tooltipText: 'Rectangle',
  41. icon: require('../assets/rect.svg'),
  42. markerType: index_1.RectMarker
  43. });
  44. exports.lineMarkerToolbarItem = new ToolbarItem_1.ToolbarItem({
  45. name: 'line-marker',
  46. tooltipText: 'Line',
  47. icon: require('../assets/line.svg'),
  48. markerType: LineMarker_1.LineMarker
  49. });
  50. function getToolbars(page) {
  51. var toolbars = [
  52. {
  53. icon: PointerIcon,
  54. name: 'pointer',
  55. tooltipText: 'Pointer'
  56. },
  57. {
  58. icon: DeleteIcon,
  59. name: 'delete',
  60. tooltipText: 'Delete'
  61. },
  62. {
  63. name: 'separator',
  64. tooltipText: ''
  65. },
  66. exports.rectMarkerToolbarItem,
  67. exports.coverMarkerToolbarItem,
  68. exports.highlightMarkerToolbarItem,
  69. exports.lineMarkerToolbarItem,
  70. exports.arrowMarkerToolbarItem,
  71. exports.textMarkerToolbarItem,
  72. {
  73. name: 'separator',
  74. tooltipText: ''
  75. }
  76. ];
  77. if (!page) {
  78. toolbars.push.apply(toolbars, [
  79. {
  80. icon: OkIcon,
  81. name: 'ok',
  82. tooltipText: 'OK'
  83. }
  84. ]);
  85. }
  86. toolbars.push({
  87. icon: CloseIcon,
  88. name: 'close',
  89. tooltipText: 'Close'
  90. });
  91. return toolbars;
  92. }
  93. exports.getToolbars = getToolbars;