summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Zara <ondrej.zara@firma.seznam.cz>2015-06-19 10:50:19 +0200
committerOndrej Zara <ondrej.zara@firma.seznam.cz>2015-06-19 10:50:19 +0200
commita8f650f5c14a5d3a194ce470a49c6c483c91e9a9 (patch)
treee65c3a995b1929a156f52dcfe607ac903717c343
parenta88720cb7cdbed181374993cf000dfd615b40a9f (diff)
downloadwwwsqldesigner-a8f650f5c14a5d3a194ce470a49c6c483c91e9a9.zip
wwwsqldesigner-a8f650f5c14a5d3a194ce470a49c6c483c91e9a9.tar.gz
wwwsqldesigner-a8f650f5c14a5d3a194ce470a49c6c483c91e9a9.tar.bz2
sql.relation constructor; fixes #206
-rw-r--r--js/relation.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/relation.js b/js/relation.js
index f593759..db47cdc 100644
--- a/js/relation.js
+++ b/js/relation.js
@@ -13,8 +13,8 @@ SQL.Relation = function(owner, row1, row2) {
if (all.length) { /* inherit */
this.color = all[0].getColor();
} else if (CONFIG.RELATION_COLORS) { /* pick next */
- this.constructor._counter++;
- var colorIndex = this.constructor._counter - 1;
+ SQL.Relation._counter++;
+ var colorIndex = SQL.Relation._counter - 1;
this.color = CONFIG.RELATION_COLORS[colorIndex % CONFIG.RELATION_COLORS.length];
}