Created
May 9, 2013 12:40
-
-
Save davidjgraph/5547214 to your computer and use it in GitHub Desktop.
single label ER changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var s = mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=bottom;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;' + mxConstants.STYLE_STROKEWIDTH + '=2;'; | |
content.appendChild(this.createVertexTemplate(s + mxConstants.STYLE_SHAPE + '=mxgraph.er.attribute;buttonText=Attribute;textColor=#000000;fontSize=17;buttonStyle=dblFrame;' + mxConstants.STYLE_FILLCOLOR + '=#ffffff;', w, h, '', 'Attribute', false)); | |
content.appendChild(this.createVertexTemplate(s + mxConstants.STYLE_SHAPE + '=mxgraph.er.bachmans;textColor=#000000;' + mxConstants.STYLE_FONTSIZE + '=17;', w * 3, h * 2, '', 'ERD Bachman\'s Notation', false)); | |
content.appendChild(this.createVertexTemplate(s + mxConstants.STYLE_SHAPE + '=mxgraph.er.chens;textColor=#000000;' + mxConstants.STYLE_FONTSIZE + '=17;', w * 3, h, '', 'ERD Chen\'s Notation', false)); | |
content.appendChild(this.createVertexTemplate(s + mxConstants.STYLE_SHAPE + '=mxgraph.er.cloud;buttonText=Cloud;textColor=#000000;' + mxConstants.STYLE_FONTSIZE + '=17;', w, h, '', 'Cloud', false)); | |
content.appendChild(this.createVertexTemplate(s + mxConstants.STYLE_SHAPE + '=mxgraph.er.entity;buttonStyle=round;' + mxConstants.STYLE_FILLCOLOR + '=#ffffff;buttonText=Entity1;', w, h, '', 'Entity', false)); | |
content.appendChild(this.createVertexTemplate(s + mxConstants.STYLE_SHAPE + '=mxgraph.er.entity;buttonStyle=rect;' + mxConstants.STYLE_FILLCOLOR + '=#ffffff;buttonText=Entity1;', w, h, '', 'Entity', false)); | |
content.appendChild(this.createVertexTemplate(s + mxConstants.STYLE_SHAPE + '=mxgraph.er.entity;buttonStyle=dblFrame;' + mxConstants.STYLE_FILLCOLOR + '=#ffffff;buttonText=Entity1;', w, h, '', 'Entity', false)); | |
content.appendChild(this.createVertexTemplate(s + mxConstants.STYLE_SHAPE + '=mxgraph.er.entityExt;buttonText=Entity;' + mxConstants.STYLE_FILLCOLOR + '=#008cff;fillColor2=#ffffff;' + mxConstants.STYLE_FONTSIZE + '=17;subText=+ attribute 1,+ attribute 2,+ attribute 3;', w, h, '', 'Entity Extended', false)); | |
content.appendChild(this.createVertexTemplate(s + mxConstants.STYLE_SHAPE + '=mxgraph.er.ie;textColor=#000000;' + mxConstants.STYLE_FONTSIZE + '=17;', w * 3.5, h * 1.2, '', 'ERD Information Engineering Notation', false)); | |
content.appendChild(this.createVertexTemplate(s + mxConstants.STYLE_SHAPE + '=mxgraph.er.has;buttonText=Has;textColor=#000000;' + mxConstants.STYLE_FONTSIZE + '=17;buttonStyle=rhombus;', w, h, '', 'Has', false)); | |
content.appendChild(this.createVertexTemplate(s + mxConstants.STYLE_SHAPE + '=mxgraph.er.hierarchy;buttonText=main;subText=sub;textColor=#000000;' + mxConstants.STYLE_FONTSIZE + '=17;buttonStyle=round;', w, h, '', 'Hierarchy', false)); | |
content.appendChild(this.createVertexTemplate(s + mxConstants.STYLE_SHAPE + '=mxgraph.er.note;buttonText=Note;textColor=#000000;' + mxConstants.STYLE_FONTSIZE + '=17;fillColor2=#ffffff;', w, h, '', 'Note', false)); | |
var s = mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=bottom;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;strokeWidth=2;'; | |
var s2 = mxConstants.STYLE_STROKEWIDTH + '=2;'; | |
content.appendChild(this.createVertexTemplate(s2 + 'shape=mxgraph.er.attribute;buttonText=;fontColor=#000000;fontSize=17;buttonStyle=dblFrame;fillColor=#ffffff;', w, h, 'Attribute', 'Attribute', true)); | |
content.appendChild(this.createVertexTemplate(s2 + 'shape=mxgraph.er.cloud;buttonText=;fontColor=#000000;fontSize=17;', w, h, 'Cloud', 'Cloud', true)); | |
content.appendChild(this.createVertexTemplate(s2 + 'shape=mxgraph.er.entity;fontColor=#666666;buttonStyle=round;fillColor=#ffffff;buttonText=;', w, h, 'Entity1', 'Entity', true)); | |
content.appendChild(this.createVertexTemplate(s2 + 'shape=mxgraph.er.entity;fontColor=#666666;buttonStyle=rect;fillColor=#ffffff;buttonText=;', w, h, 'Entity1', 'Entity', true)); | |
content.appendChild(this.createVertexTemplate(s2 + 'shape=mxgraph.er.entity;fontColor=#666666;buttonStyle=dblFrame;fillColor=#ffffff;buttonText=;', w, h, 'Entity1', 'Entity', true)); | |
content.appendChild(this.createVertexTemplate(s2 + 'shape=mxgraph.er.has;buttonText=;fontSize=17;buttonStyle=rhombus;', w, h, 'Has', 'Has', true)); | |
content.appendChild(this.createVertexTemplate(s2 + 'shape=mxgraph.er.hierarchy;buttonText=;subText=;fontSize=17;html=1;buttonStyle=round;overflow=width;', w, h, | |
'<table cellpadding="0" cellspacing="0" style="font-size:1em;width:100%;margin-bottom:14px;"><tr><td align="center" width="50%">main</td><td align="center" style="padding:10px;padding-left:0px;" width="50%">sub</td></tr></table>', 'Hierarchy', true)); | |
content.appendChild(this.createVertexTemplate(s2 + 'shape=mxgraph.er.note;buttonText=;fontSize=17;fillColor2=#ffffff;', w, h, 'Note', 'Note', true)); | |
content.appendChild(this.createVertexTemplate(s2 + 'shape=mxgraph.er.entityExt;buttonText=;verticalAlign=top;fillColor=#008cff;fontSize=17;subText=;overflow=fill;html=1;', w, h, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment