Sidebar-Floorplan.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  1. (function()
  2. {
  3. // Adds Floorplan shapes
  4. Sidebar.prototype.addFloorplanPalette = function()
  5. {
  6. var w = 100;
  7. var h = 100;
  8. var s = mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=bottom;html=1;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;align=center;shape=mxgraph.floorplan.';
  9. var s2 = mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=center;html=1;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;align=center;shape=mxgraph.floorplan.';
  10. var gn = 'mxgraph.floorplan';
  11. var dt = 'floorplan ';
  12. this.setCurrentSearchEntryLibrary('floorplan');
  13. var fns =
  14. [
  15. this.createVertexTemplateEntry(s + 'wall;fillColor=strokeColor;',
  16. w, 10, '', 'Wall (Horizontal)', null, null, this.getTagsForStencil(gn, 'wall', dt).join(' ')),
  17. this.createVertexTemplateEntry(s + 'wall;fillColor=strokeColor;direction=south;',
  18. 10, h, '', 'Wall (Vertical)', null, null, this.getTagsForStencil(gn, 'wall', dt).join(' ')),
  19. this.createVertexTemplateEntry(s + 'wallCorner;fillColor=strokeColor;',
  20. w, h, '', 'Wall (Corner NW)', null, null, this.getTagsForStencil(gn, 'wallCorner', dt).join(' ')),
  21. this.createVertexTemplateEntry(s + 'wallCorner;fillColor=strokeColor;direction=south;',
  22. w, h, '', 'Wall (Corner NE)', null, null, this.getTagsForStencil(gn, 'wallCorner', dt).join(' ')),
  23. this.createVertexTemplateEntry(s + 'wallCorner;fillColor=strokeColor;direction=west',
  24. w, h, '', 'Wall (Corner SE)', null, null, this.getTagsForStencil(gn, 'wallCorner', dt).join(' ')),
  25. this.createVertexTemplateEntry(s + 'wallCorner;fillColor=strokeColor;direction=north',
  26. w, h, '', 'Wall (Corner SW)', null, null, this.getTagsForStencil(gn, 'wallCorner', dt).join(' ')),
  27. this.createVertexTemplateEntry(s + 'wallU;fillColor=strokeColor;',
  28. w, h, '', 'Wall (U)', null, null, this.getTagsForStencil(gn, 'wallU', dt).join(' ')),
  29. this.createVertexTemplateEntry(s + 'room;fillColor=strokeColor;',
  30. w, h, '', 'Room', null, null, this.getTagsForStencil(gn, 'room', dt).join(' ')),
  31. this.createVertexTemplateEntry('shape=dimension;whiteSpace=wrap;html=1;align=center;points=[];verticalAlign=bottom;spacingBottom=3;labelBackgroundColor=none;', 100, 40, 'Label', 'Horizontal Dimension', null, null, 'horizontal dimension measure distance unit'),
  32. this.createVertexTemplateEntry('shape=dimension;direction=west;whiteSpace=wrap;html=1;align=center;points=[];verticalAlign=top;spacingTop=-15;labelBackgroundColor=none;', 100, 40, 'Label', 'Horizontal Dimension', null, null, 'horizontal dimension measure distance unit'),
  33. this.createVertexTemplateEntry('shape=dimension;direction=north;whiteSpace=wrap;html=1;align=center;points=[];verticalAlign=bottom;labelBackgroundColor=none;horizontal=0;spacingBottom=3;', 40, 100, 'Label', 'Vertical Dimension', null, null, 'vertical dimension measure distance unit'),
  34. this.createVertexTemplateEntry('shape=dimension;direction=south;whiteSpace=wrap;html=1;align=center;points=[];verticalAlign=top;labelBackgroundColor=none;horizontal=0;spacingTop=-15;', 40, 100, 'Label', 'Vertical Dimension', null, null, 'vertical dimension measure distance unit'),
  35. this.createVertexTemplateEntry(s + 'window;',
  36. w, 10, '', 'Window', null, null, this.getTagsForStencil(gn, 'window', dt).join(' ')),
  37. this.createVertexTemplateEntry(s + 'windowGlider;dx=0.25;',
  38. 100, 10, '', 'Window, Glider', null, null, this.getTagsForStencil(gn, 'windowGlider', dt).join(' ')),
  39. this.createVertexTemplateEntry(s + 'windowGarden;dx=0.25;',
  40. 100, 20, '', 'Window, Garden', null, null, this.getTagsForStencil(gn, 'windowGarden', dt).join(' ')),
  41. this.createVertexTemplateEntry(s + 'windowBow;strokeWidth=3;',
  42. 100, 20, '', 'Window, Bow', null, null, this.getTagsForStencil(gn, 'windowBow', dt).join(' ')),
  43. this.createVertexTemplateEntry(s + 'windowBay;strokeWidth=3;aspect=fixed;',
  44. 100, 40, '', 'Window, Bay', null, null, this.getTagsForStencil(gn, 'windowBay', dt).join(' ')),
  45. this.createVertexTemplateEntry(s + 'stairs;',
  46. 300, 100, '', 'Stairs', null, null, this.getTagsForStencil(gn, 'stairs', dt).join(' ')),
  47. this.createVertexTemplateEntry(s + 'stairs;direction=south;',
  48. 100, 300, '', 'Stairs', null, null, this.getTagsForStencil(gn, 'stairs', dt).join(' ')),
  49. this.createVertexTemplateEntry(s + 'stairsRest;',
  50. 300, 200, '', 'Stairs', null, null, this.getTagsForStencil(gn, 'stairsRest', dt).join(' ')),
  51. this.createVertexTemplateEntry(s + 'doorLeft;aspect=fixed;',
  52. 80, 85, '', 'Door', null, null, this.getTagsForStencil(gn, 'doorLeft', dt).join(' ')),
  53. this.createVertexTemplateEntry(s + 'doorRight;aspect=fixed;',
  54. 80, 85, '', 'Door', null, null, this.getTagsForStencil(gn, 'doorRight', dt).join(' ')),
  55. this.createVertexTemplateEntry(s + 'doorDouble;aspect=fixed;',
  56. 160, 85, '', 'Door, Double', null, null, this.getTagsForStencil(gn, 'doorDouble', dt).join(' ')),
  57. this.createVertexTemplateEntry(s + 'doorUneven;dx=0.5;',
  58. 160, 85, '', 'Door, Uneven', null, null, this.getTagsForStencil(gn, 'doorUneven', dt).join(' ')),
  59. this.createVertexTemplateEntry(s + 'doorOpposing;dx=0.5;',
  60. 160, 165, '', 'Door, Opposing', null, null, this.getTagsForStencil(gn, 'doorOpposing', dt).join(' ')),
  61. this.createVertexTemplateEntry(s + 'doorRevolving;aspect=fixed;',
  62. 80, 85, '', 'Door, Revolving', null, null, this.getTagsForStencil(gn, 'doorLeft', dt).join(' ')),
  63. this.createVertexTemplateEntry(s + 'doorPocket;dx=0.5;',
  64. 104, 10, '', 'Door, Pocket', null, null, this.getTagsForStencil(gn, 'doorPocket', dt).join(' ')),
  65. this.createVertexTemplateEntry(s + 'doorDoublePocket;dx=0.25;',
  66. 104, 10, '', 'Door, Double Pocket', null, null, this.getTagsForStencil(gn, 'doorDoublePocket', dt).join(' ')),
  67. this.createVertexTemplateEntry(s + 'doorBypass;dx=0.25;',
  68. 104, 10, '', 'Door, By-pass', null, null, this.getTagsForStencil(gn, 'doorBypass', dt).join(' ')),
  69. this.createVertexTemplateEntry(s + 'doorBifold;dx=0.3;',
  70. 160, 40, '', 'Door, Bi-fold', null, null, this.getTagsForStencil(gn, 'doorBifold', dt).join(' ')),
  71. this.createVertexTemplateEntry(s + 'doorSlidingGlass;dx=0.25;',
  72. 104, 10, '', 'Door, SlidingGlass', null, null, this.getTagsForStencil(gn, 'doorSlidingGlass', dt).join(' ')),
  73. this.createVertexTemplateEntry(s + 'doorOverhead;',
  74. 104, 30, '', 'Door, Overhead', null, null, this.getTagsForStencil(gn, 'doorOverhead', dt).join(' ')),
  75. this.createVertexTemplateEntry(s + 'doorAccordion;dx=0.6;',
  76. 160, 30, '', 'Door, Accordion', null, null, this.getTagsForStencil(gn, 'accordion', dt).join(' ')),
  77. this.createVertexTemplateEntry(s + 'doorDoubleAction;aspect=fixed;',
  78. 80, 165, '', 'Door, Double Action', null, null, this.getTagsForStencil(gn, 'doorDoubleAction', dt).join(' ')),
  79. this.createVertexTemplateEntry(s + 'opening;',
  80. 50, 10, '', 'Opening', null, null, this.getTagsForStencil(gn, 'opening', dt).join(' ')),
  81. this.createVertexTemplateEntry(s + 'bathtub2;',
  82. 180, 60, '', 'Bathtub', null, null, this.getTagsForStencil(gn, 'bathtub', dt).join(' ')),
  83. this.createVertexTemplateEntry(s + 'bed_double;',
  84. 200, 180, '', 'Bed, Double', null, null, this.getTagsForStencil(gn, 'bed_double', dt).join(' ')),
  85. this.createVertexTemplateEntry(s + 'bed_single;',
  86. 100, 180, '', 'Bed Single', null, null, this.getTagsForStencil(gn, 'bed_single', dt).join(' ')),
  87. this.createVertexTemplateEntry(s + 'bookcase;',
  88. 120, 30, '', 'Bookcase', null, null, this.getTagsForStencil(gn, 'bookcase', dt).join(' ')),
  89. this.createVertexTemplateEntry(s + 'chair;',
  90. 41, 52, '', 'Chair', null, null, this.getTagsForStencil(gn, 'chair', dt).join(' ')),
  91. this.createVertexTemplateEntry(s + 'copier;',
  92. 110, 60, '', 'Copier', null, null, this.getTagsForStencil(gn, 'copier', dt).join(' ')),
  93. this.createVertexTemplateEntry(s + 'couch;',
  94. 150, 80, '', 'Couch', null, null, this.getTagsForStencil(gn, 'couch', dt).join(' ')),
  95. this.createVertexTemplateEntry(s + 'crt_tv;',
  96. 60, 40, '', 'CRT TV', null, null, this.getTagsForStencil(gn, 'crt_tv', dt).join(' ')),
  97. this.createVertexTemplateEntry(s + 'desk_corner;',
  98. 150, 150, '', 'Desk Corner', null, null, this.getTagsForStencil(gn, 'desk_corner', dt).join(' ')),
  99. this.createVertexTemplateEntry(s + 'desk_corner_2;',
  100. 150, 120, '', 'Desk Corner 2', null, null, this.getTagsForStencil(gn, 'desk_corner_2', dt).join(' ')),
  101. this.createVertexTemplateEntry(s + 'dresser;',
  102. 100, 65, '', 'Dresser', null, null, this.getTagsForStencil(gn, 'dresser', dt).join(' ')),
  103. this.createVertexTemplateEntry(s + 'elevator;',
  104. 100, 100, '', 'Elevator', null, null, this.getTagsForStencil(gn, 'elevator', dt).join(' ')),
  105. this.createVertexTemplateEntry(s + 'fireplace;',
  106. 304, 200, '', 'Fireplace', null, null, this.getTagsForStencil(gn, 'fireplace', dt).join(' ')),
  107. this.createVertexTemplateEntry(s + 'flat_tv;',
  108. 70, 10, '', 'Flat TV', null, null, this.getTagsForStencil(gn, 'flat_tv', dt).join(' ')),
  109. this.createVertexTemplateEntry(s + 'floor_lamp;',
  110. 50, 50, '', 'Floor Lamp', null, null, this.getTagsForStencil(gn, 'floor_lamp', dt).join(' ')),
  111. this.createVertexTemplateEntry(s + 'laptop;',
  112. 40, 35, '', 'Laptop', null, null, this.getTagsForStencil(gn, 'laptop', dt).join(' ')),
  113. this.createVertexTemplateEntry(s + 'office_chair;',
  114. 40, 43, '', 'Office Chair', null, null, this.getTagsForStencil(gn, 'office_chair', dt).join(' ')),
  115. this.createVertexTemplateEntry(s + 'piano;',
  116. 135, 143, '', 'Piano', null, null, this.getTagsForStencil(gn, 'piano', dt).join(' ')),
  117. this.createVertexTemplateEntry(s + 'plant;',
  118. 47, 51, '', 'Plant', null, null, this.getTagsForStencil(gn, 'plant', dt).join(' ')),
  119. this.createVertexTemplateEntry(s + 'printer;',
  120. 40, 47, '', 'Printer', null, null, this.getTagsForStencil(gn, 'printer', dt).join(' ')),
  121. this.createVertexTemplateEntry(s + 'range_1;',
  122. 50, 62, '', 'Range 1', null, null, this.getTagsForStencil(gn, 'range_1', dt).join(' ')),
  123. this.createVertexTemplateEntry(s + 'range_2;',
  124. 75, 62, '', 'Range 2', null, null, this.getTagsForStencil(gn, 'range_2', dt).join(' ')),
  125. this.createVertexTemplateEntry(s + 'refrigerator;',
  126. 60, 62, '', 'Refrigerator', null, null, this.getTagsForStencil(gn, 'refrigerator', dt).join(' ')),
  127. this.createVertexTemplateEntry(s + 'shower2;',
  128. 100, 100, '', 'Shower', null, null, this.getTagsForStencil(gn, 'shower', dt).join(' ')),
  129. this.createVertexTemplateEntry(s + 'sink_1;',
  130. 40, 35, '', 'Sink 1', null, null, this.getTagsForStencil(gn, 'sink_1', dt).join(' ')),
  131. this.createVertexTemplateEntry(s + 'sink_22;',
  132. 40, 35, '', 'Sink 2', null, null, this.getTagsForStencil(gn, 'sink_2', dt).join(' ')),
  133. this.createVertexTemplateEntry(s + 'sink_double2;',
  134. 80, 35, '', 'Sink Double', null, null, this.getTagsForStencil(gn, 'sink_double', dt).join(' ')),
  135. this.createVertexTemplateEntry(s + 'sofa;',
  136. 90, 80, '', 'Sofa', null, null, this.getTagsForStencil(gn, 'sofa', dt).join(' ')),
  137. this.createVertexTemplateEntry(s + 'spiral_stairs;',
  138. 200, 200, '', 'Spiral Stairs', null, null, this.getTagsForStencil(gn, 'spiral_stairs', dt).join(' ')),
  139. this.createVertexTemplateEntry(s + 'table;',
  140. 90, 50, '', 'Table', null, null, this.getTagsForStencil(gn, 'table', dt).join(' ')),
  141. this.createVertexTemplateEntry(s + 'toilet;',
  142. 50, 67, '', 'Toilet', null, null, this.getTagsForStencil(gn, 'toilet', dt).join(' ')),
  143. this.createVertexTemplateEntry(s + 'water_cooler;',
  144. 40, 40, '', 'Water Cooler', null, null, this.getTagsForStencil(gn, 'water_cooler', dt).join(' ')),
  145. this.createVertexTemplateEntry(s + 'workstation;',
  146. 50, 40, '', 'Workstation', null, null, this.getTagsForStencil(gn, 'workstation', dt).join(' ')),
  147. this.addEntry(dt + 'kitchen table small', function()
  148. {
  149. var table = new mxCell('', new mxGeometry(0, 20, 80, 80), 'shape=rect;shadow=0;html=1;');
  150. table.vertex = true;
  151. var chair1 = new mxCell('', new mxGeometry(20, 0, 40, 52), s + 'chair;shadow=0;');
  152. chair1.vertex = true;
  153. var chair2 = new mxCell('', new mxGeometry(20, 68, 40, 52), s + 'chair;shadow=0;rotation=180;');
  154. chair2.vertex = true;
  155. return sb.createVertexTemplateFromCells([chair1, chair2, table], 80, 120, 'Small kitchen table');
  156. }),
  157. this.addEntry(dt + 'kitchen table', function()
  158. {
  159. var table = new mxCell('', new mxGeometry(20, 20, 100, 100), 'shape=rect;shadow=0;html=1;');
  160. table.vertex = true;
  161. var chair1 = new mxCell('', new mxGeometry(50, 0, 40, 52), s + 'chair;shadow=0;');
  162. chair1.vertex = true;
  163. var chair2 = new mxCell('', new mxGeometry(50, 88, 40, 52), s + 'chair;shadow=0;direction=west;');
  164. chair2.vertex = true;
  165. var chair3 = new mxCell('', new mxGeometry(0, 50, 52, 40), s + 'chair;shadow=0;direction=north;');
  166. chair3.vertex = true;
  167. var chair4 = new mxCell('', new mxGeometry(88, 50, 52, 40), s + 'chair;shadow=0;direction=south');
  168. chair4.vertex = true;
  169. return sb.createVertexTemplateFromCells([chair1, chair2, chair3, chair4, table], 140, 140, 'Kitchen table');
  170. }),
  171. this.addEntry(dt + 'kitchen table round', function()
  172. {
  173. var table = new mxCell('', new mxGeometry(20, 20, 100, 100), 'shape=ellipse;shadow=0;html=1;');
  174. table.vertex = true;
  175. var chair1 = new mxCell('', new mxGeometry(50, 0, 40, 52), s + 'chair;shadow=0;');
  176. chair1.vertex = true;
  177. var chair2 = new mxCell('', new mxGeometry(50, 88, 40, 52), s + 'chair;shadow=0;direction=west;');
  178. chair2.vertex = true;
  179. var chair3 = new mxCell('', new mxGeometry(0, 50, 52, 40), s + 'chair;shadow=0;direction=north;');
  180. chair3.vertex = true;
  181. var chair4 = new mxCell('', new mxGeometry(88, 50, 52, 40), s + 'chair;shadow=0;direction=south');
  182. chair4.vertex = true;
  183. return sb.createVertexTemplateFromCells([chair1, chair2, chair3, chair4, table], 140, 140, 'Round kitchen table');
  184. }),
  185. this.addEntry(dt + 'kitchen table large', function()
  186. {
  187. var table = new mxCell('', new mxGeometry(20, 20, 160, 100), 'shape=rect;shadow=0;html=1;');
  188. table.vertex = true;
  189. var chair1 = new mxCell('', new mxGeometry(50, 0, 40, 52), s + 'chair;shadow=0;');
  190. chair1.vertex = true;
  191. var chair2 = new mxCell('', new mxGeometry(50, 88, 40, 52), s + 'chair;shadow=0;direction=west;');
  192. chair2.vertex = true;
  193. var chair3 = new mxCell('', new mxGeometry(0, 50, 52, 40), s + 'chair;shadow=0;direction=north;');
  194. chair3.vertex = true;
  195. var chair4 = new mxCell('', new mxGeometry(148, 50, 52, 40), s + 'chair;shadow=0;direction=south');
  196. chair4.vertex = true;
  197. var chair5 = new mxCell('', new mxGeometry(110, 0, 40, 52), s + 'chair;shadow=0;');
  198. chair5.vertex = true;
  199. var chair6 = new mxCell('', new mxGeometry(110, 88, 40, 52), s + 'chair;shadow=0;direction=west;');
  200. chair6.vertex = true;
  201. return sb.createVertexTemplateFromCells([chair1, chair2, chair3, chair4, chair5, chair6, table], 200, 140, 'Large kitchen table');
  202. }),
  203. this.addEntry(dt + 'kitchen table large oval', function()
  204. {
  205. var table = new mxCell('', new mxGeometry(20, 20, 160, 100), 'shape=ellipse;shadow=0;html=1;');
  206. table.vertex = true;
  207. var chair1 = new mxCell('', new mxGeometry(50, 0, 40, 52), s + 'chair;shadow=0;');
  208. chair1.vertex = true;
  209. var chair2 = new mxCell('', new mxGeometry(50, 88, 40, 52), s + 'chair;shadow=0;direction=west;');
  210. chair2.vertex = true;
  211. var chair3 = new mxCell('', new mxGeometry(0, 50, 52, 40), s + 'chair;shadow=0;direction=north;');
  212. chair3.vertex = true;
  213. var chair4 = new mxCell('', new mxGeometry(148, 50, 52, 40), s + 'chair;shadow=0;direction=south');
  214. chair4.vertex = true;
  215. var chair5 = new mxCell('', new mxGeometry(110, 0, 40, 52), s + 'chair;shadow=0;');
  216. chair5.vertex = true;
  217. var chair6 = new mxCell('', new mxGeometry(110, 88, 40, 52), s + 'chair;shadow=0;direction=west;');
  218. chair6.vertex = true;
  219. return sb.createVertexTemplateFromCells([chair1, chair2, chair3, chair4, chair5, chair6, table], 200, 140, 'Large oval kitchen table');
  220. }),
  221. this.addEntry(dt + 'office table', function()
  222. {
  223. var table = new mxCell('', new mxGeometry(0, 20, 80, 50), 'shape=rect;shadow=0;html=1;');
  224. table.vertex = true;
  225. var chair1 = new mxCell('', new mxGeometry(20, 0, 40, 43), s + 'office_chair;shadow=0;');
  226. chair1.vertex = true;
  227. var item1 = new mxCell('', new mxGeometry(15, 30, 50, 40), s + 'workstation;shadow=0;flipV=1;');
  228. item1.vertex = true;
  229. return sb.createVertexTemplateFromCells([chair1, table, item1], 80, 70, 'Office table');
  230. }),
  231. this.addEntry(dt + 'office table', function()
  232. {
  233. var table = new mxCell('', new mxGeometry(20, 20, 100, 100), 'shape=rect;shadow=0;html=1;');
  234. table.vertex = true;
  235. var chair1 = new mxCell('', new mxGeometry(50, 0, 40, 43), s + 'office_chair;shadow=0;');
  236. chair1.vertex = true;
  237. var chair2 = new mxCell('', new mxGeometry(50, 97, 40, 43), s + 'office_chair;shadow=0;direction=west;');
  238. chair2.vertex = true;
  239. var chair3 = new mxCell('', new mxGeometry(0, 50, 43, 40), s + 'office_chair;shadow=0;direction=north;');
  240. chair3.vertex = true;
  241. var chair4 = new mxCell('', new mxGeometry(97, 50, 43, 40), s + 'office_chair;shadow=0;direction=south');
  242. chair4.vertex = true;
  243. return sb.createVertexTemplateFromCells([chair1, chair2, chair3, chair4, table], 140, 140, 'Office table');
  244. }),
  245. this.addEntry(dt + 'office table large', function()
  246. {
  247. var table = new mxCell('', new mxGeometry(20, 20, 160, 100), 'shape=rect;shadow=0;html=1;');
  248. table.vertex = true;
  249. var chair1 = new mxCell('', new mxGeometry(50, 0, 40, 43), s + 'office_chair;shadow=0;');
  250. chair1.vertex = true;
  251. var chair2 = new mxCell('', new mxGeometry(50, 97, 40, 43), s + 'office_chair;shadow=0;direction=west;');
  252. chair2.vertex = true;
  253. var chair3 = new mxCell('', new mxGeometry(0, 50, 43, 40), s + 'office_chair;shadow=0;direction=north;');
  254. chair3.vertex = true;
  255. var chair4 = new mxCell('', new mxGeometry(157, 50, 43, 40), s + 'office_chair;shadow=0;direction=south');
  256. chair4.vertex = true;
  257. var chair5 = new mxCell('', new mxGeometry(110, 0, 40, 43), s + 'office_chair;shadow=0;');
  258. chair5.vertex = true;
  259. var chair6 = new mxCell('', new mxGeometry(110, 97, 40, 43), s + 'office_chair;shadow=0;direction=west;');
  260. chair6.vertex = true;
  261. return sb.createVertexTemplateFromCells([chair1, chair2, chair3, chair4, chair5, chair6, table], 200, 140, 'Large office table');
  262. }),
  263. this.addEntry(dt + 'office table large oval', function()
  264. {
  265. var table = new mxCell('', new mxGeometry(20, 20, 160, 100), 'shape=ellipse;shadow=0;html=1;');
  266. table.vertex = true;
  267. var chair1 = new mxCell('', new mxGeometry(50, 0, 40, 43), s + 'office_chair;shadow=0;');
  268. chair1.vertex = true;
  269. var chair2 = new mxCell('', new mxGeometry(50, 97, 40, 43), s + 'office_chair;shadow=0;direction=west;');
  270. chair2.vertex = true;
  271. var chair3 = new mxCell('', new mxGeometry(0, 50, 43, 40), s + 'office_chair;shadow=0;direction=north;');
  272. chair3.vertex = true;
  273. var chair4 = new mxCell('', new mxGeometry(157, 50, 43, 40), s + 'office_chair;shadow=0;direction=south');
  274. chair4.vertex = true;
  275. var chair5 = new mxCell('', new mxGeometry(110, 0, 40, 43), s + 'office_chair;shadow=0;');
  276. chair5.vertex = true;
  277. var chair6 = new mxCell('', new mxGeometry(110, 97, 40, 43), s + 'office_chair;shadow=0;direction=west;');
  278. chair6.vertex = true;
  279. return sb.createVertexTemplateFromCells([chair1, chair2, chair3, chair4, chair5, chair6, table], 200, 140, 'Large oval office table');
  280. }),
  281. this.addEntry(dt + 'office table large oval', function()
  282. {
  283. var table = new mxCell('', new mxGeometry(20, 20, 280, 100), 'shape=ellipse;shadow=0;html=1;');
  284. table.vertex = true;
  285. var chair1 = new mxCell('', new mxGeometry(50, 0, 40, 43), s + 'office_chair;shadow=0;');
  286. chair1.vertex = true;
  287. var chair2 = new mxCell('', new mxGeometry(50, 97, 40, 43), s + 'office_chair;shadow=0;direction=west;');
  288. chair2.vertex = true;
  289. var chair3 = new mxCell('', new mxGeometry(0, 50, 43, 40), s + 'office_chair;shadow=0;direction=north;');
  290. chair3.vertex = true;
  291. var chair4 = new mxCell('', new mxGeometry(277, 50, 43, 40), s + 'office_chair;shadow=0;direction=south');
  292. chair4.vertex = true;
  293. var chair5 = new mxCell('', new mxGeometry(110, 0, 40, 43), s + 'office_chair;shadow=0;');
  294. chair5.vertex = true;
  295. var chair6 = new mxCell('', new mxGeometry(110, 97, 40, 43), s + 'office_chair;shadow=0;direction=west;');
  296. chair6.vertex = true;
  297. var chair7 = new mxCell('', new mxGeometry(170, 0, 40, 43), s + 'office_chair;shadow=0;');
  298. chair7.vertex = true;
  299. var chair8 = new mxCell('', new mxGeometry(170, 97, 40, 43), s + 'office_chair;shadow=0;direction=west;');
  300. chair8.vertex = true;
  301. var chair9 = new mxCell('', new mxGeometry(230, 0, 40, 43), s + 'office_chair;shadow=0;');
  302. chair9.vertex = true;
  303. var chair10 = new mxCell('', new mxGeometry(230, 97, 40, 43), s + 'office_chair;shadow=0;direction=west;');
  304. chair10.vertex = true;
  305. return sb.createVertexTemplateFromCells([chair1, chair2, chair3, chair4, chair5, chair6, chair7, chair8, chair9, chair10, table], 320, 140, 'Large oval office table');
  306. }),
  307. this.addEntry(dt + 'office table conference large huge', function()
  308. {
  309. var table = new mxCell('', new mxGeometry(20, 20, 520, 100), 'shape=ellipse;shadow=0;html=1;');
  310. table.vertex = true;
  311. var chair1 = new mxCell('', new mxGeometry(50, 0, 40, 43), s + 'office_chair;shadow=0;');
  312. chair1.vertex = true;
  313. var chair2 = new mxCell('', new mxGeometry(50, 97, 40, 43), s + 'office_chair;shadow=0;direction=west;');
  314. chair2.vertex = true;
  315. var chair3 = new mxCell('', new mxGeometry(0, 50, 43, 40), s + 'office_chair;shadow=0;direction=north;');
  316. chair3.vertex = true;
  317. var chair4 = new mxCell('', new mxGeometry(517, 50, 43, 40), s + 'office_chair;shadow=0;direction=south');
  318. chair4.vertex = true;
  319. var chair5 = new mxCell('', new mxGeometry(110, 0, 40, 43), s + 'office_chair;shadow=0;');
  320. chair5.vertex = true;
  321. var chair6 = new mxCell('', new mxGeometry(110, 97, 40, 43), s + 'office_chair;shadow=0;direction=west;');
  322. chair6.vertex = true;
  323. var chair7 = new mxCell('', new mxGeometry(170, 0, 40, 43), s + 'office_chair;shadow=0;');
  324. chair7.vertex = true;
  325. var chair8 = new mxCell('', new mxGeometry(170, 97, 40, 43), s + 'office_chair;shadow=0;direction=west;');
  326. chair8.vertex = true;
  327. var chair9 = new mxCell('', new mxGeometry(230, 0, 40, 43), s + 'office_chair;shadow=0;');
  328. chair9.vertex = true;
  329. var chair10 = new mxCell('', new mxGeometry(230, 97, 40, 43), s + 'office_chair;shadow=0;direction=west;');
  330. chair10.vertex = true;
  331. var chair11 = new mxCell('', new mxGeometry(290, 0, 40, 43), s + 'office_chair;shadow=0;');
  332. chair11.vertex = true;
  333. var chair12 = new mxCell('', new mxGeometry(290, 97, 40, 43), s + 'office_chair;shadow=0;direction=west;');
  334. chair12.vertex = true;
  335. var chair13 = new mxCell('', new mxGeometry(350, 0, 40, 43), s + 'office_chair;shadow=0;');
  336. chair13.vertex = true;
  337. var chair14 = new mxCell('', new mxGeometry(350, 97, 40, 43), s + 'office_chair;shadow=0;direction=west;');
  338. chair14.vertex = true;
  339. var chair15 = new mxCell('', new mxGeometry(410, 0, 40, 43), s + 'office_chair;shadow=0;');
  340. chair15.vertex = true;
  341. var chair16 = new mxCell('', new mxGeometry(410, 97, 40, 43), s + 'office_chair;shadow=0;direction=west;');
  342. chair16.vertex = true;
  343. var chair17 = new mxCell('', new mxGeometry(470, 0, 40, 43), s + 'office_chair;shadow=0;');
  344. chair17.vertex = true;
  345. var chair18 = new mxCell('', new mxGeometry(470, 97, 40, 43), s + 'office_chair;shadow=0;direction=west;');
  346. chair18.vertex = true;
  347. return sb.createVertexTemplateFromCells([chair1, chair2, chair3, chair4, chair5, chair6, chair7, chair8, chair9, chair10, chair11, chair12, chair13, chair14, chair15, chair16, chair17, chair18, table], 560, 140, 'Conference table');
  348. })
  349. ];
  350. this.addPalette('floorplan', mxResources.get('floorplans'), false, mxUtils.bind(this, function(content)
  351. {
  352. for (var i = 0; i < fns.length; i++)
  353. {
  354. content.appendChild(fns[i](content));
  355. }
  356. }));
  357. this.setCurrentSearchEntryLibrary();
  358. };
  359. })();