Sidebar-LeanMapping.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. (function()
  2. {
  3. // Adds Lean Mapping shapes
  4. Sidebar.prototype.addLeanMappingPalette = function()
  5. {
  6. var w = 100;
  7. var h = 100;
  8. var s = mxConstants.STYLE_STROKEWIDTH + '=2;html=1;shape=mxgraph.lean_mapping.';
  9. var s2 = mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=bottom;html=1;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;strokeWidth=2;shape=mxgraph.lean_mapping.';
  10. var sb = this;
  11. //default tags
  12. var dt = 'value stream lean mapping ';
  13. var gn = 'mxgraph.lean_mapping';
  14. var fns =
  15. [
  16. this.createVertexTemplateEntry(s2 + 'boat_shipment;align=center;', w, h, '', 'Boat Shipment', null, null, this.getTagsForStencil(gn, 'boat_shipment', dt).join(' ')),
  17. this.addEntry(dt + 'data box', function()
  18. {
  19. var bg = new mxCell('', new mxGeometry(0, 0, 60, 100), s + 'data_box;html=1;');
  20. bg.vertex = true;
  21. var text1 = new mxCell('C/T=', new mxGeometry(0, 0, 60, 20), 'text;fontSize=8;spacingLeft=2;verticalAlign=middle;html=1;');
  22. text1.vertex = true;
  23. bg.insert(text1);
  24. var text2 = new mxCell('C/O=', new mxGeometry(0, 20, 60, 20), 'text;fontSize=8;spacingLeft=2;verticalAlign=middle;html=1;');
  25. text2.vertex = true;
  26. bg.insert(text2);
  27. var text3 = new mxCell('Batch=', new mxGeometry(0, 40, 60, 20), 'text;fontSize=8;spacingLeft=2;verticalAlign=middle;html=1;');
  28. text3.vertex = true;
  29. bg.insert(text3);
  30. var text4 = new mxCell('Avail=', new mxGeometry(0, 60, 60, 20), 'text;fontSize=8;spacingLeft=2;verticalAlign=middle;html=1;');
  31. text4.vertex = true;
  32. bg.insert(text4);
  33. var text5 = new mxCell('', new mxGeometry(0, 80, 60, 20), 'text;fontSize=8;spacingLeft=2;verticalAlign=middle;html=1;');
  34. text5.vertex = true;
  35. bg.insert(text5);
  36. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Data Box');
  37. }),
  38. this.createVertexTemplateEntry(s + 'outside_sources;whiteSpace=wrap;align=center;', w, h * 0.7,
  39. '<table cellpadding="5" cellspacing="0" style="font-size:1em;width:100%;height:100%;">' +
  40. '<tr><td height="50%"></td></tr>' +
  41. '<tr><td align="center" height="50%">XYZ Corp</td></tr></table>',
  42. 'Customer/Supplier', null, null, this.getTagsForStencil(gn, 'outside_sources', dt).join(' ')),
  43. this.addEntry(dt + 'dedicated process manufacturing', function()
  44. {
  45. var bg = new mxCell('\nDescription', new mxGeometry(0, 0, 100, 70), s + 'manufacturing_process;fontSize=12;verticalAlign=middle;html=1;align=center;whiteSpace=wrap;');
  46. bg.vertex = true;
  47. var text1 = new mxCell('Process', new mxGeometry(0, 0, 100, 13), 'text;fontSize=12;spacingLeft=2;verticalAlign=top;html=1;align=center;spacingTop=-5;resizeWidth=1;');
  48. text1.vertex = true;
  49. bg.insert(text1);
  50. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Dedicated Process');
  51. }),
  52. this.createVertexTemplateEntry(s + 'manufacturing_process_shared;spacingTop=-5;align=center;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;', w, h * 0.7,
  53. 'Process',
  54. 'Shared Process', null, null, this.getTagsForStencil(gn, 'manufacturing_process_shared', dt).join(' ')),
  55. this.createVertexTemplateEntry(s2 + 'work_cell;', w * 0.7, h * 0.6, '', 'Workcell', null, null, this.getTagsForStencil(gn, 'work_cell', dt).join(' ')),
  56. this.createVertexTemplateEntry(s2 + 'inventory_box;', w, h * 0.9, '', 'Inventory Box', null, null, this.getTagsForStencil(gn, 'inventory_box', dt).join(' ')),
  57. this.createVertexTemplateEntry(s2 + 'push_arrow;', w, h * 0.3,'', 'Push Arrow', null, null, this.getTagsForStencil(gn, 'push_arrow', dt).join(' ')),
  58. this.createVertexTemplateEntry(s + 'supermarket;', w * 0.6, h,'', 'Supermarket', null, null, this.getTagsForStencil(gn, 'supermarket', dt).join(' ')),
  59. this.createVertexTemplateEntry(s2 + 'physical_pull;', w, h,'', 'Material Pull', null, null, this.getTagsForStencil(gn, 'physical_pull', dt).join(' ')),
  60. this.createVertexTemplateEntry(s + 'fifo_lane;overflow=fill;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;align=center;', w, h * 0.5,
  61. '<table cellpadding="0" cellspacing="0" style="font-size:1em;width:100%;height:100%;">' +
  62. '<tr><td height="0%">MAX=XX</td></tr>' +
  63. '<tr><td align="center" height="100%"></td></tr></table>',
  64. 'FIFO Lane', null, null, this.getTagsForStencil(gn, 'fifo_lane', dt).join(' ')),
  65. this.createVertexTemplateEntry(s + 'buffer_or_safety_stock;', w * 0.4, h,'', 'Safety Stock', null, null, this.getTagsForStencil(gn, 'buffer_or_safety_stock', dt).join(' ')),
  66. this.addEntry(this.getTagsForStencil(gn, 'truck_shipment', dt).join(' '), function()
  67. {
  68. var bg = new mxCell('', new mxGeometry(0, 0, 100, 100), s + 'truck_shipment;');
  69. bg.vertex = true;
  70. var text1 = new mxCell('2x per\nWeek', new mxGeometry(0, 0, 60, 80), 'text;fontSize=12;verticalAlign=middle;html=1;align=center;whiteSpace=wrap;');
  71. text1.vertex = true;
  72. bg.insert(text1);
  73. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Truck Shipment');
  74. }),
  75. this.createVertexTemplateEntry(s + 'schedule;whiteSpace=wrap;align=center;', w, h * 0.7, 'Production\nControl', 'Production Control', null, null, this.getTagsForStencil(gn, 'schedule', dt).join(' ')),
  76. this.createVertexTemplateEntry(s + 'schedule;whiteSpace=wrap;align=center;', w, h * 0.7, 'Other\nInformation', 'Other Information', null, null, this.getTagsForStencil(gn, 'schedule', dt).join(' ')),
  77. this.createVertexTemplateEntry(s2 + 'go_see_production_scheduling;', 92, 60, '', 'Go See Production Scheduling', null, null, this.getTagsForStencil(gn, 'go_see_production_scheduling', dt).join(' ')),
  78. this.addEntry(this.getTagsForStencil(gn, 'kaizen_lightening_burst', dt).join(' '), function()
  79. {
  80. var bg = new mxCell('', new mxGeometry(0, 0, 90, 40), s2 + 'kaizen_lightening_burst;');
  81. bg.vertex = true;
  82. var text1 = new mxCell('', new mxGeometry(8, 8, 74, 24), 'rect;fillColor=#000000;strokeColor=none;');
  83. text1.vertex = true;
  84. bg.insert(text1);
  85. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Kaizen Lightening Burst');
  86. }),
  87. this.createVertexTemplateEntry(s2 + 'kanban_post;', 50, 100, '', 'Kanban Post', null, null, this.getTagsForStencil(gn, 'kanban_post', dt).join(' ')),
  88. this.createVertexTemplateEntry(s2 + 'load_leveling;', 100, 30, '', 'Load Leveling', null, null, this.getTagsForStencil(gn, 'load_leveling', dt).join(' ')),
  89. this.createVertexTemplateEntry(s2 + 'move_by_forklift;', 92, 100, '', 'Move by Forklift', null, null, this.getTagsForStencil(gn, 'move_by_forklift', dt).join(' ')),
  90. this.createVertexTemplateEntry(s + 'mrp_erp;whiteSpace=wrap;', 70, 100, '', 'MRP/ERP', null, null, this.getTagsForStencil(gn, 'mrp_erp', dt).join(' ')),
  91. this.createVertexTemplateEntry(s2 + 'operator;', 100, 84, '', 'Operator', null, null, this.getTagsForStencil(gn, 'operator', dt).join(' ')),
  92. this.createVertexTemplateEntry(s + 'quality_problem;fontSize=24;fontStyle=1;whiteSpace=wrap;align=center;', 80, 100, 'Q', 'Quality Problem', null, null, this.getTagsForStencil(gn, 'quality_problem', dt).join(' ')),
  93. this.createVertexTemplateEntry(s2 + 'verbal;', 50, 100, '', 'Verbal Information', null, null, this.getTagsForStencil(gn, 'verbal', dt).join(' ')),
  94. this.createVertexTemplateEntry(s + 'fifo_sequence_flow;fontStyle=0;fontSize=20;align=center;', w, h * 0.5, 'FIFO', 'FIFO Sequence', null, null, this.getTagsForStencil(gn, 'fifo_sequence_flow', dt).join(' ')),
  95. this.createVertexTemplateEntry(s + 'production_kanban;overflow=fill;', w, h,
  96. '<p style="font-size:2em;margin-right:35px;margin-top:13px;text-align:right">P</p>',
  97. 'Production Kanban', null, null, this.getTagsForStencil(gn, 'production_kanban', dt).join(' ')),
  98. this.createVertexTemplateEntry(s + 'withdrawal_kanban;overflow=fill;', w, h,
  99. '<p style="font-size:2em;margin-right:35px;margin-top:13px;text-align:right">W</p>',
  100. 'Withdrawal Kanban', null, null, this.getTagsForStencil(gn, 'withdrawal_kanban', dt).join(' ')),
  101. this.createVertexTemplateEntry(s + 'signal_kanban;overflow=fill;', w, h * 0.9,
  102. '<p style="font-size:2em;margin-right:35px;margin-top:4px;text-align:right">S</p>',
  103. 'Signal Kanban', null, null, this.getTagsForStencil(gn, 'signal_kanban', dt).join(' ')),
  104. this.createVertexTemplateEntry(s2 + 'sequenced_pull_ball;', w * 0.6, h * 0.6, '', 'Sequenced Pull Ball', null, null, this.getTagsForStencil(gn, 'sequenced_pull_ball', dt).join(' ')),
  105. this.createVertexTemplateEntry(s2 + 'rail_shipment;', w, h * 0.3, '', 'Rail Shipment', null, null, this.getTagsForStencil(gn, 'rail_shipment', dt).join(' ')),
  106. this.createVertexTemplateEntry(s2 + 'airplane_7;', 100, 45, '', 'Air Freight', null, null, this.getTagsForStencil(gn, 'airplane_7', dt).join(' ')),
  107. this.createVertexTemplateEntry(s2 + 'warehouse;', w, h * 0.6, '', 'Warehouse', null, null, this.getTagsForStencil(gn, 'warehouse', dt).join(' ')),
  108. this.createVertexTemplateEntry(s2 + 'timeline2;dx1=0;dy1=1;dx2=30;dy2=0;dx3=160;dy3=1;dx4=230;dy4=0;dx5=310;dy5=1;dy6=0;', w * 4, h * 0.4, '', 'Timeline', null, null, this.getTagsForStencil(gn, 'timeline', dt).join(' ')),
  109. this.createVertexTemplateEntry(s2 + 'crossDock;', w, h * 0.8, '', 'Cross-Dock', null, null, this.getTagsForStencil(gn, 'crossDock', dt).join(' ')),
  110. this.createVertexTemplateEntry(s + 'orders;overflow=fill;', w, h * 0.6,
  111. '<table cellpadding="0" cellspacing="0" style="font-size:1.5em;width:100%;height:100%;">' +
  112. '<tr><td height="65%"></td></tr>' +
  113. '<tr><td align="center" height="35%">IN</td></tr></table>',
  114. 'Orders', null, null, this.getTagsForStencil(gn, 'orders', dt).join(' ')),
  115. this.createVertexTemplateEntry(s2 + 'batched_kanban;', w * 2, h * 0.8, '', 'Batched Kanban', null, null, this.getTagsForStencil(gn, 'batched_kanban', dt).join(' ')),
  116. this.createVertexTemplateEntry(s2 + 'control_center;', w * 0.8, h * 0.8, '', 'Control Center', null, null, this.getTagsForStencil(gn, 'control_center', dt).join(' ')),
  117. this.createEdgeTemplateEntry('arrow;html=1;', 100, 100, '', 'Shipments', null, this.getTagsForStencil(gn, 'arrow', dt).join(' ')),
  118. this.createEdgeTemplateEntry('shape=mxgraph.lean_mapping.manual_info_flow_edge;html=1;', 100, 100, 'Daily', 'Manual Information', null, this.getTagsForStencil(gn, 'manual_info_flow_edge', dt).join(' ')),
  119. this.createEdgeTemplateEntry('shape=mxgraph.lean_mapping.electronic_info_flow_edge;html=1;', 100, 100, 'Monthly', 'Electronic Information', null, this.getTagsForStencil(gn, 'electronic_info_flow_edge', dt).join(' '))
  120. ];
  121. this.addPalette('lean_mapping', mxResources.get('leanMapping'), false, mxUtils.bind(this, function(content)
  122. {
  123. for (var i = 0; i < fns.length; i++)
  124. {
  125. content.appendChild(fns[i](content));
  126. }
  127. }));
  128. };
  129. })();