sql.relation constructor; fixes #206

This commit is contained in:
Ondrej Zara
2015-06-19 10:50:19 +02:00
parent a88720cb7c
commit a8f650f5c1
+2 -2
View File
@@ -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];
}