Sidebar-ER.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. (function()
  2. {
  3. // Adds ER shapes
  4. Sidebar.prototype.addErPalette = function()
  5. {
  6. // Avoids having to bind all functions to "this"
  7. var sb = this;
  8. // Reusable cells
  9. var row = new mxCell('Row', new mxGeometry(0, 0, 40, 26), 'text;html=1;strokeColor=none;fillColor=none;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;');
  10. row.vertex = true;
  11. // Predefined dimensions
  12. var w = 100;
  13. var h = 100;
  14. // Default tags
  15. var dt = 'er entity relation ';
  16. var fns = [
  17. this.addEntry(dt + 'table', function()
  18. {
  19. var cell = new mxCell('Table', new mxGeometry(0, 0, 160, 110),
  20. 'swimlane;html=1;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;');
  21. cell.vertex = true;
  22. cell.insert(sb.cloneCell(row, 'Row 1'));
  23. cell.insert(sb.cloneCell(row, 'Row 2'));
  24. cell.insert(sb.cloneCell(row, 'Row 3'));
  25. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Table');
  26. }),
  27. this.addEntry(dt + 'table section subsection', function()
  28. {
  29. var cell = new mxCell('Section', new mxGeometry(0, 0, 140, 110),
  30. 'swimlane;html=1;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=22;fillColor=none;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;');
  31. cell.vertex = true;
  32. cell.insert(sb.cloneCell(row, 'Row 1'));
  33. cell.insert(sb.cloneCell(row, 'Row 2'));
  34. cell.insert(sb.cloneCell(row, 'Row 3'));
  35. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Section');
  36. }),
  37. this.addEntry(dt + 'table section subsection', function()
  38. {
  39. var cell = new mxCell('Table', new mxGeometry(0, 0, 160, 144),
  40. 'swimlane;html=1;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;');
  41. cell.vertex = true;
  42. var cell1 = new mxCell('uniqueId', new mxGeometry(0, 0, 90, 30), 'shape=partialRectangle;top=0;left=0;right=0;bottom=1;html=1;align=left;verticalAlign=middle;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontStyle=5;');
  43. cell1.vertex = true;
  44. var cell11 = sb.cloneCell(row, 'PK');
  45. cell11.connectable = false;
  46. cell11.style = 'shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;'
  47. cell11.geometry.width = 30;
  48. cell11.geometry.height = 30;
  49. cell1.insert(cell11);
  50. cell.insert(cell1);
  51. var cell2 = new mxCell('row 1', new mxGeometry(0, 0, 90, 26), 'shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;');
  52. cell2.vertex = true;
  53. var cell21 = sb.cloneCell(row, '');
  54. cell21.connectable = false;
  55. cell21.style = 'shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;'
  56. cell21.geometry.width = 30;
  57. cell2.insert(cell21);
  58. cell.insert(cell2);
  59. cell2 = sb.graph.cloneCells([cell2])[0];
  60. cell2.value = 'row 2';
  61. cell.insert(cell2);
  62. cell2 = sb.graph.cloneCells([cell2])[0];
  63. cell2.value = 'row 3';
  64. cell.insert(cell2);
  65. cell2 = sb.graph.cloneCells([cell2])[0];
  66. cell2.value = '';
  67. cell2.children[0].geometry.height = 10;
  68. cell2.geometry.height = 10;
  69. cell.insert(cell2);
  70. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'ER Table 1');
  71. }),
  72. this.addEntry(dt + 'table section subsection', function()
  73. {
  74. var cell = new mxCell('Table', new mxGeometry(0, 0, 160, 112),
  75. 'swimlane;html=1;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;');
  76. cell.vertex = true;
  77. var cell1 = new mxCell('row 1', new mxGeometry(0, 0, 90, 30), 'shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=middle;fillColor=none;spacingLeft=60;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontStyle=5;');
  78. cell1.vertex = true;
  79. var cell11 = sb.cloneCell(row, 'PK,FK1');
  80. cell11.connectable = false;
  81. cell11.style = 'shape=partialRectangle;fontStyle=1;top=0;left=0;bottom=0;html=1;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;'
  82. cell11.geometry.width = 56;
  83. cell11.geometry.height = 30;
  84. cell1.insert(cell11);
  85. cell.insert(cell1);
  86. var cell1 = new mxCell('row 2', new mxGeometry(0, 0, 90, 30), 'shape=partialRectangle;top=0;left=0;right=0;bottom=1;html=1;align=left;verticalAlign=middle;fillColor=none;spacingLeft=60;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontStyle=5;');
  87. cell1.vertex = true;
  88. var cell11 = sb.cloneCell(row, 'PK,FK2');
  89. cell11.connectable = false;
  90. cell11.style = 'shape=partialRectangle;fontStyle=1;top=0;left=0;bottom=0;html=1;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;'
  91. cell11.geometry.width = 56;
  92. cell11.geometry.height = 30;
  93. cell1.insert(cell11);
  94. cell.insert(cell1);
  95. var cell2 = new mxCell('row 1', new mxGeometry(0, 0, 90, 26), 'shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=60;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;');
  96. cell2.vertex = true;
  97. var cell21 = sb.cloneCell(row, '');
  98. cell21.connectable = false;
  99. cell21.style = 'shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;'
  100. cell21.geometry.width = 56;
  101. cell2.insert(cell21);
  102. cell.insert(cell2);
  103. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'ER Table 2');
  104. }),
  105. this.addEntry(dt + 'table row', function()
  106. {
  107. return sb.createVertexTemplateFromCells([row.clone()], row.geometry.width, row.geometry.height, 'Row 1');
  108. }),
  109. this.addEntry(dt + 'table row', function()
  110. {
  111. var cell = new mxCell('uniqueId', new mxGeometry(0, 0, 90, 26), 'shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;fillColor=none;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;');
  112. cell.vertex = true;
  113. var cell1 = sb.cloneCell(row, 'PK');
  114. cell1.connectable = false;
  115. cell1.style = 'shape=partialRectangle;top=0;left=0;bottom=0;right=0;html=1;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;'
  116. cell1.geometry.width = 30;
  117. cell.insert(cell1);
  118. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Row 2');
  119. }),
  120. this.addEntry(dt + 'table row', function()
  121. {
  122. var cell = new mxCell('uniqueId', new mxGeometry(0, 0, 90, 26), 'shape=partialRectangle;top=0;left=0;right=0;bottom=1;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;');
  123. cell.vertex = true;
  124. var cell1 = sb.cloneCell(row, 'PK');
  125. cell1.connectable = false;
  126. cell1.style = 'shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;'
  127. cell1.geometry.width = 30;
  128. cell.insert(cell1);
  129. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Row 3');
  130. }),
  131. this.addEntry(dt + 'table row', function()
  132. {
  133. var cell = new mxCell('row', new mxGeometry(0, 0, 120, 26), 'shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=60;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;');
  134. cell.vertex = true;
  135. var cell1 = sb.cloneCell(row, '');
  136. cell1.connectable = false;
  137. cell1.style = 'shape=partialRectangle;fontStyle=1;top=0;left=0;bottom=0;html=1;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;'
  138. cell1.geometry.width = 56;
  139. cell.insert(cell1);
  140. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Row 4');
  141. }),
  142. this.addEntry(dt + 'table row', function()
  143. {
  144. var cell = new mxCell('uniqueId', new mxGeometry(0, 0, 90, 26), 'shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;');
  145. cell.vertex = true;
  146. var cell1 = sb.cloneCell(row, 'PK');
  147. cell1.connectable = false;
  148. cell1.style = 'shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;'
  149. cell1.geometry.width = 30;
  150. cell.insert(cell1);
  151. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Row 5');
  152. }),
  153. this.addEntry(dt + 'table row', function()
  154. {
  155. var cell = new mxCell('uniqueId', new mxGeometry(0, 0, 90, 26), 'shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;');
  156. cell.vertex = true;
  157. var cell1 = sb.cloneCell(row, '');
  158. cell1.connectable = false;
  159. cell1.style = 'shape=partialRectangle;top=0;left=0;bottom=0;html=1;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;'
  160. cell1.geometry.width = 30;
  161. cell.insert(cell1);
  162. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Row 6');
  163. }),
  164. this.addEntry(dt + 'table row', function()
  165. {
  166. var cell = new mxCell('uniqueId', new mxGeometry(0, 0, 90, 26), 'shape=partialRectangle;top=0;left=0;right=0;bottom=0;html=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;');
  167. cell.vertex = true;
  168. var cell1 = sb.cloneCell(row, '');
  169. cell1.connectable = false;
  170. cell1.style = 'shape=partialRectangle;top=0;left=0;bottom=0;right=0;html=1;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;'
  171. cell1.geometry.width = 30;
  172. cell.insert(cell1);
  173. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Row 7');
  174. }),
  175. this.addEntry(dt + 'table row divider hline line separator', function()
  176. {
  177. var divider = new mxCell('', new mxGeometry(0, 0, 40, 8), 'line;html=1;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;');
  178. divider.vertex = true;
  179. return sb.createVertexTemplateFromCells([divider], divider.geometry.width, divider.geometry.height, 'Divider');
  180. }),
  181. this.addEntry(dt + 'table row spacer space gap separator', function()
  182. {
  183. var cell = new mxCell('', new mxGeometry(0, 0, 20, 14), 'text;html=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=4;spacingRight=4;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;');
  184. cell.vertex = true;
  185. return sb.createVertexTemplateFromCells([cell.clone()], cell.geometry.width, cell.geometry.height, 'Spacer');
  186. }),
  187. this.createVertexTemplateEntry('text;html=1;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;strokeColor=#000000;fillColor=#e0e0e0;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;',
  188. 80, 26, 'Title', 'Title', null, null, 'er entity relation table title label'),
  189. this.addEntry(dt + 'table', function()
  190. {
  191. var cell = new mxCell('Entity', new mxGeometry(0, 0, 160, 120),
  192. 'swimlane;html=1;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;fillColor=#008cff;fontColor=#FFFFFF;rounded=1;fontSize=17;fontStyle=0;strokeWidth=2;resizeParent=0;resizeLast=1;shadow=0;dashed=0;align=center;');
  193. cell.vertex = true;
  194. var cell1 = new mxCell('+Attribute1\n+Attribute2\n+Attribute3', new mxGeometry(0, 30, 160, 90), 'whiteSpace=wrap;html=1;align=left;strokeColor=none;fillColor=none;spacingLeft=4;fontSize=17;verticalAlign=top;resizable=0;rotatable=0;part=1;');
  195. cell1.vertex = true;
  196. cell.insert(cell1);
  197. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Entity 2');
  198. }),
  199. this.createVertexTemplateEntry('ellipse;shape=doubleEllipse;margin=10;strokeWidth=2;fontSize=17;whiteSpace=wrap;html=1;align=center;', w, h, 'Attribute', 'Attribute', null, null, dt + 'attribute'),
  200. this.createVertexTemplateEntry('ellipse;shape=cloud;strokeWidth=2;fontSize=17;whiteSpace=wrap;html=1;align=center;', w, h, 'Cloud', 'Cloud', null, null, dt + 'cloud'),
  201. this.createVertexTemplateEntry('strokeWidth=2;rounded=1;arcSize=10;whiteSpace=wrap;html=1;align=center;', w, h, 'Entity', 'Entity 3', null, null, dt),
  202. this.createVertexTemplateEntry('strokeWidth=2;whiteSpace=wrap;html=1;align=center;', w, h, 'Entity', 'Entity 4', null, null, dt),
  203. this.createVertexTemplateEntry('shape=ext;strokeWidth=2;margin=10;double=1;whiteSpace=wrap;html=1;align=center;', w, h, 'Entity', 'Entity 5', null, null, dt),
  204. this.createVertexTemplateEntry('shape=rhombus;strokeWidth=2;fontSize=17;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;', w, h, 'Has', 'Has', null, null, dt + 'has'),
  205. this.createVertexTemplateEntry('shape=rhombus;double=1;strokeWidth=2;fontSize=17;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;', w, h, 'Has', 'Has', null, null, dt + 'has'),
  206. this.addEntry(dt + 'hierarchy', function()
  207. {
  208. var cell = new mxCell('', new mxGeometry(0, 0, 100, 100), 'html=1;strokeWidth=2;shape=mxgraph.er.rrect;rSize=5;');
  209. cell.vertex = true;
  210. var cell1 = new mxCell('main', new mxGeometry(0, 0, 50, 100), 'html=1;strokeWidth=2;shape=mxgraph.er.anchor;fontSize=17;whiteSpace=wrap;');
  211. cell1.vertex = true;
  212. cell.insert(cell1);
  213. var cell2 = new mxCell('sub', new mxGeometry(50, 5, 45, 90), 'html=1;strokeWidth=2;shape=mxgraph.er.rrect;rSize=5;fontSize=17;whiteSpace=wrap;points=[];');
  214. cell2.vertex = true;
  215. cell.insert(cell2);
  216. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Hierarchy');
  217. }),
  218. this.createVertexTemplateEntry('shape=note;strokeWidth=2;fontSize=17;size=20;whiteSpace=wrap;html=1;', w, h, 'Note', 'Note', null, null, dt + 'note'),
  219. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERzeroToMany;endFill=1;', w, h, '', '0 to Many Optional', null, dt + 'zero many optional'),
  220. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERoneToMany;', w, h, '', '1 to Many', null, dt + 'one many'),
  221. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERmandOne;', w, h, '', '1 Mandatory', null, dt + 'one mandatory'),
  222. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERmandOne;startArrow=ERmandOne;', w, h, '', '1 to 1', null, dt + 'one'),
  223. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERone;endFill=1;', w, h, '', '1', null, dt + 'one'),
  224. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERzeroToOne;endFill=1;', w, h, '', '0 to 1', null, dt + 'zero one'),
  225. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERmany;', w, h, '', 'Many', null, dt + 'many'),
  226. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERmany;startArrow=ERmany;', w, h, '', 'Many to Many', null, dt + 'many'),
  227. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERzeroToMany;startArrow=ERzeroToOne;', w, h, '', '1 Optional to Many Optional', null, dt + 'one optional many'),
  228. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERzeroToMany;startArrow=ERmandOne;', w, h, '', '1 Mandatory to Many Optional', null, dt + 'one mandatory many optional'),
  229. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERzeroToOne;startArrow=ERmandOne;', w, h, '', '1 Mandatory to 1 Optional', null, dt + 'one mandatory optional'),
  230. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERoneToMany;startArrow=ERmandOne;', w, h, '', '1 Mandatory to Many Mandatory', null, dt + 'one mandatory many'),
  231. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERoneToMany;startArrow=ERzeroToOne;', w, h, '', '1 Optional to Many Mandatory', null, dt + 'one optional mandatory many'),
  232. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERoneToMany;startArrow=ERoneToMany;', w, h, '', 'Many Mandatory to Many Mandatory', null, dt + 'mandatory many'),
  233. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERoneToMany;startArrow=ERzeroToMany;', w, h, '', 'Many Optional to Many Mandatory', null, dt + 'mandatory many optional'),
  234. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERzeroToMany;endFill=1;startArrow=ERzeroToMany;', w, h, '', 'Many Optional to Many Optional', null, dt + 'many optional')
  235. ];
  236. this.addPaletteFunctions('er', mxResources.get('entityRelation'), false, fns);
  237. };
  238. })();