projects
/
erdiag.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
006d95a
)
Smarter shuffling (only links, not attributes)
author
Benjamin Auder
<benjamin.auder@somewhere>
Wed, 31 Jan 2018 11:28:54 +0000
(12:28 +0100)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Wed, 31 Jan 2018 11:28:54 +0000
(12:28 +0100)
parser.js
patch
|
blob
|
blame
|
history
diff --git
a/parser.js
b/parser.js
index
6caf0a9
..
5d61040
100644
(file)
--- a/
parser.js
+++ b/
parser.js
@@
-202,7
+202,7
@@
class ErDiags
mcdDot += '];\n';
if (!!this.entities[name].attributes)
{
mcdDot += '];\n';
if (!!this.entities[name].attributes)
{
-
_.shuffle(this.entities[name].attributes)
.forEach( a => {
+
this.entities[name].attributes
.forEach( a => {
let label = (a.isKey ? '#' : '') + a.name;
let attrName = name + '_' + a.name;
mcdDot += '"' + attrName + '" [shape=ellipse, label="' + label + '"];\n';
let label = (a.isKey ? '#' : '') + a.name;
let attrName = name + '_' + a.name;
mcdDot += '"' + attrName + '" [shape=ellipse, label="' + label + '"];\n';
@@
-226,7
+226,7
@@
class ErDiags
mcdDot += '<tr><td BGCOLOR="#ae7d4e" BORDER="0"><font COLOR="#FFFFFF">' + name + '</font></td></tr>\n';
if (!!this.entities[name].attributes)
{
mcdDot += '<tr><td BGCOLOR="#ae7d4e" BORDER="0"><font COLOR="#FFFFFF">' + name + '</font></td></tr>\n';
if (!!this.entities[name].attributes)
{
-
_.shuffle(this.entities[name].attributes)
.forEach( a => {
+
this.entities[name].attributes
.forEach( a => {
let label = (a.isKey ? '<u>' : '') + a.name + (a.isKey ? '</u>' : '');
mcdDot += '<tr><td BGCOLOR="#FFFFFF" BORDER="0" ALIGN="LEFT"><font COLOR="#000000" >' + label + '</font></td></tr>\n';
});
let label = (a.isKey ? '<u>' : '') + a.name + (a.isKey ? '</u>' : '');
mcdDot += '<tr><td BGCOLOR="#FFFFFF" BORDER="0" ALIGN="LEFT"><font COLOR="#000000" >' + label + '</font></td></tr>\n';
});
@@
-266,7
+266,7
@@
class ErDiags
});
if (!!a.attributes)
{
});
if (!!a.attributes)
{
-
_.shuffle(a.attributes)
.forEach( attr => {
+
a.attributes
.forEach( attr => {
let label = (attr.isKey ? '#' : '') + attr.name;
mcdDot += '"' + name + '_' + attr.name + '" [shape=ellipse, label="' + label + '"];\n';
let attrName = name + '_' + attr.name;
let label = (attr.isKey ? '#' : '') + attr.name;
mcdDot += '"' + name + '_' + attr.name + '" [shape=ellipse, label="' + label + '"];\n';
let attrName = name + '_' + attr.name;