No Description

toolbar-items.js 3.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 CloseIcon = require('../assets/times.svg');
  13. exports.dragToolbarItem = new ToolbarItem_1.ToolbarItem({
  14. name: 'drag',
  15. tooltipText: 'Drag',
  16. icon: require('../assets/drag.svg')
  17. });
  18. exports.highlightMarkerToolbarItem = new ToolbarItem_1.ToolbarItem({
  19. name: 'cover-marker',
  20. tooltipText: 'Hightlight',
  21. shortcut: 'Shift+H',
  22. icon: require('../assets/highlight.svg'),
  23. markerType: index_5.HighlightMarker,
  24. draggable: true
  25. });
  26. exports.arrowMarkerToolbarItem = new ToolbarItem_1.ToolbarItem({
  27. name: 'arrow-marker',
  28. tooltipText: 'Arrow',
  29. shortcut: 'Shift+A',
  30. icon: require('../assets/arrow.svg'),
  31. markerType: index_4.ArrowMarker,
  32. draggable: true
  33. });
  34. exports.textMarkerToolbarItem = new ToolbarItem_1.ToolbarItem({
  35. name: 'text-marker',
  36. tooltipText: 'Text',
  37. shortcut: 'Shift+T',
  38. icon: require('../assets/text.svg'),
  39. markerType: index_3.TextMarker,
  40. draggable: true
  41. });
  42. exports.coverMarkerToolbarItem = new ToolbarItem_1.ToolbarItem({
  43. name: 'cover-marker',
  44. tooltipText: 'Cover',
  45. shortcut: 'Shift+C',
  46. icon: require('../assets/cover.svg'),
  47. markerType: index_2.CoverMarker,
  48. draggable: true
  49. });
  50. exports.rectMarkerToolbarItem = new ToolbarItem_1.ToolbarItem({
  51. name: 'rect-marker',
  52. tooltipText: 'Rectangle',
  53. shortcut: 'Shift+R',
  54. icon: require('../assets/rect.svg'),
  55. markerType: index_1.RectMarker,
  56. draggable: true
  57. });
  58. exports.lineMarkerToolbarItem = new ToolbarItem_1.ToolbarItem({
  59. name: 'line-marker',
  60. tooltipText: 'Line',
  61. shortcut: 'Shift+L',
  62. icon: require('../assets/line.svg'),
  63. markerType: LineMarker_1.LineMarker,
  64. draggable: true
  65. });
  66. exports.closeToolbarItem = new ToolbarItem_1.ToolbarItem({
  67. icon: CloseIcon,
  68. name: 'close',
  69. tooltipText: 'Close'
  70. });
  71. exports.separatorToolbarItem = new ToolbarItem_1.ToolbarItem({ name: 'separator', tooltipText: '' });
  72. function getToolbars(page) {
  73. var toolbars = [
  74. {
  75. icon: DeleteIcon,
  76. name: 'delete',
  77. tooltipText: 'Delete'
  78. },
  79. exports.rectMarkerToolbarItem,
  80. exports.coverMarkerToolbarItem,
  81. exports.highlightMarkerToolbarItem,
  82. exports.lineMarkerToolbarItem,
  83. exports.arrowMarkerToolbarItem,
  84. exports.textMarkerToolbarItem
  85. ];
  86. if (!page) {
  87. toolbars.push.apply(toolbars, [
  88. {
  89. icon: OkIcon,
  90. name: 'ok',
  91. tooltipText: 'OK'
  92. }
  93. ]);
  94. }
  95. return toolbars;
  96. }
  97. exports.getToolbars = getToolbars;