LoopDraw Help

Content

Important notes

Format Model

<mxGraphModel dx="976" dy="862" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" background="#ffffff"> <root> <mxCell id="0"/> <mxCell id="-1" parent="0"/> <mxCell id="1" value="&lt;div&gt;&lt;b&gt;ModelName&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&amp;lt;PersistedModel&amp;gt;&lt;/i&gt;&lt;/div&gt;" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=36;horizontalStack=0;collapsible=1;marginBottom=16;swimlaneFillColor=#ffffff;html=1;rounded=1;shadow=1;marginTop=6;strokeColor=#000000;" parent="-1" vertex="1"> <mxGeometry x="30" y="26" width="210" height="148" as="geometry"/> </mxCell> <mxCell id="0.0.3" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="1" vertex="1"> <mxGeometry y="42" width="210" height="1" as="geometry"/> </mxCell> <mxCell id="0.0.0" value="* field:&lt;b&gt;type&lt;/b&gt;" style="text;strokeColor=none;fillColor=none;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;" parent="1" vertex="1"> <mxGeometry y="50" width="210" height="30" as="geometry"/> </mxCell> <mxCell id="0.0.1" value="fk_name(FK)@&lt;b&gt;relation_name&lt;/b&gt;" style="text;strokeColor=none;fillColor=none;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;" parent="1" vertex="1"> <mxGeometry y="80" width="210" height="26" as="geometry"/> </mxCell> <mxCell id="0.0.2" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="1" vertex="1"> <mxGeometry y="106" width="210" height="1" as="geometry"/> </mxCell> <mxCell id="973.6587552356846" value="&lt;p&gt;relation_name@&lt;b&gt;model_name&lt;/b&gt;&lt;/p&gt;" style="strokeColor=none;portConstraint=eastwest;rounded=1;html=1;" parent="1" vertex="1"> <mxGeometry y="114" width="210" height="34" as="geometry"/> </mxCell> </root> </mxGraphModel>

Notes of format

Model

<mxGraphModel dx="1426" dy="862" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" background="#ffffff"> <root> <mxCell id="0"/> <mxCell id="-1" parent="0"/> <mxCell id="1" value="&lt;div&gt;&lt;b&gt;ModelName&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&amp;lt;PersistedModel&amp;gt;&lt;/i&gt;&lt;/div&gt;" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=36;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;html=1;rounded=1;shadow=1;marginTop=6;" parent="-1" vertex="1"> <mxGeometry x="30" y="41" width="240" height="130" as="geometry"/> </mxCell> <mxCell id="0.0.0" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="1" vertex="1"> <mxGeometry y="42" width="240" height="8" as="geometry"/> </mxCell> <mxCell id="0.0.1" value="modelnamechilds@&lt;b&gt;modelnamechilds&lt;/b&gt;" style="text;strokeColor=none;fillColor=none;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;" parent="1" vertex="1"> <mxGeometry y="50" width="240" height="20" as="geometry"/> </mxCell> <mxCell id="1.0" value="fk_name1(FK)@&lt;b&gt;modelnamechild2&lt;/b&gt;" style="text;strokeColor=none;fillColor=none;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;" parent="1" vertex="1"> <mxGeometry y="70" width="240" height="20" as="geometry"/> </mxCell> <mxCell id="21" value="rel_hbtm_c@&lt;b&gt;modelnamechild3&lt;/b&gt;" style="text;strokeColor=none;fillColor=none;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;" parent="1" vertex="1"> <mxGeometry y="90" width="240" height="20" as="geometry"/> </mxCell> <mxCell id="3" value="rel_htm_2@&lt;b&gt;modelnamechild4&lt;/b&gt;" style="text;strokeColor=none;fillColor=none;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;" parent="1" vertex="1"> <mxGeometry y="110" width="240" height="20" as="geometry"/> </mxCell> <mxCell id="2" value="&lt;div&gt;&lt;b&gt;ModelNameChild&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&amp;lt;PersistedModel&amp;gt;&lt;/i&gt;&lt;/div&gt;" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=38;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;html=1;rounded=1;shadow=1;marginTop=6;" parent="-1" vertex="1"> <mxGeometry x="440" y="45" width="210" height="126" as="geometry"/> </mxCell> <mxCell id="0.1.2" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="2" vertex="1"> <mxGeometry y="44" width="210" height="1" as="geometry"/> </mxCell> <mxCell id="0.1.0" value="modelnameId@&lt;b&gt;modelname&lt;/b&gt;" style="text;strokeColor=none;fillColor=none;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;" parent="2" vertex="1"> <mxGeometry y="45" width="210" height="20" as="geometry"/> </mxCell> <mxCell id="4" value="modelnameId@&lt;b&gt;modelname2&lt;/b&gt;" style="text;strokeColor=none;fillColor=none;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;" parent="2" vertex="1"> <mxGeometry y="65" width="210" height="20" as="geometry"/> </mxCell> <mxCell id="0.1.1" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="2" vertex="1"> <mxGeometry y="85" width="210" height="1" as="geometry"/> </mxCell> <mxCell id="5" value="rel_hbtm_name@&lt;b&gt;modelname3&lt;/b&gt;" style="text;strokeColor=none;fillColor=none;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;" parent="2" vertex="1"> <mxGeometry y="86" width="210" height="20" as="geometry"/> </mxCell> <mxCell id="6" value="rel_hmt_1@&lt;b&gt;modelname4&lt;/b&gt;" style="text;strokeColor=none;fillColor=none;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;" parent="2" vertex="1"> <mxGeometry y="106" width="210" height="20" as="geometry"/> </mxCell> <mxCell id="32" value="hasOne" style="endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;" parent="-1" edge="1" target="0.0.1" source="0.1.0"> <mxGeometry relative="1" as="geometry"> <mxPoint x="300" y="250" as="sourcePoint"/> <mxPoint x="295.28571428571433" y="218" as="targetPoint"/> <Array as="points"/> </mxGeometry> </mxCell> <mxCell id="7" value="&lt;div&gt;&lt;b&gt;ModelNameThrough&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&amp;lt;PersistedModel&amp;gt;&lt;/i&gt;&lt;/div&gt;" style="swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=38;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;html=1;rounded=1;shadow=1;marginTop=6;" parent="-1" vertex="1"> <mxGeometry x="200" y="276" width="230" height="114" as="geometry"/> </mxCell> <mxCell id="0.3.0" value="modelnamechildId@&lt;b&gt;modelnamechild&lt;/b&gt;" style="text;strokeColor=none;fillColor=none;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;" parent="7" vertex="1"> <mxGeometry y="44" width="230" height="32" as="geometry"/> </mxCell> <mxCell id="8" value="modelnameId@&lt;b&gt;modelname&lt;/b&gt;" style="text;strokeColor=none;fillColor=none;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;" parent="7" vertex="1"> <mxGeometry y="76" width="230" height="30" as="geometry"/> </mxCell> <mxCell id="0.3.2" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="7" vertex="1"> <mxGeometry y="106" width="230" height="8" as="geometry"/> </mxCell> <mxCell id="9" value="hasMany" style="endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;" parent="-1" edge="1" target="1.0" source="4"> <mxGeometry relative="1" as="geometry"> <mxPoint x="330" y="260" as="sourcePoint"/> <mxPoint x="381" y="120" as="targetPoint"/> <Array as="points"> <mxPoint x="260" y="120"/> <mxPoint x="260" y="120"/> </Array> </mxGeometry> </mxCell> <mxCell id="10" value="hasAndBelongsToMany" style="endArrow=diamondThin;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;" parent="-1" source="21" target="5" edge="1"> <mxGeometry relative="1" as="geometry"> <mxPoint x="265" y="200" as="sourcePoint"/> <mxPoint x="330" y="153" as="targetPoint"/> <Array as="points"> <mxPoint x="330" y="146"/> <mxPoint x="330" y="149"/> </Array> </mxGeometry> </mxCell> <mxCell id="11" value="hasMany" style="endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;exitX=0.605;exitY=1.038;exitPerimeter=0;" parent="-1" source="3" target="8" edge="1"> <mxGeometry relative="1" as="geometry"> <mxPoint x="140" y="180" as="sourcePoint"/> <mxPoint x="310" y="360" as="targetPoint"/> <Array as="points"> <mxPoint x="175" y="369"/> </Array> </mxGeometry> </mxCell> <mxCell id="12" value="hasMany" style="endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;" parent="-1" source="6" target="0.3.0" edge="1"> <mxGeometry relative="1" as="geometry"> <mxPoint x="410" y="510" as="sourcePoint"/> <mxPoint x="570" y="510" as="targetPoint"/> <Array as="points"> <mxPoint x="470" y="332"/> </Array> </mxGeometry> </mxCell> <mxCell id="1.0.1" value="hasManyThrough" style="endArrow=diamondThin;dashed=1;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;" parent="-1" source="3" target="6" edge="1"> <mxGeometry relative="1" as="geometry"> <mxPoint x="230" y="220" as="sourcePoint"/> <mxPoint x="390" y="220" as="targetPoint"/> <Array as="points"/> </mxGeometry> </mxCell> </root> </mxGraphModel>

Relation

General

Has One / Has Many

Has and Belongs to Many

Has Many Through

Output JSON


Functions

Save to XML

This will save in the server folders ( /diagram/ER_Model.xml) the XML of the current State of the Diagram

Update Form JSON

This will update from any change on the JSON files without changing the styling

Update JSON

This will update your JSON files according to the current diagram configuration

Reload JSON

Delete current diagram and reload form the JSON, and applying default layout, Styling will be lost