Include the instance name in the rule id

This fixes #177. The addRules method of definition.js checks rule inheritance using the id of the rule, and only adds rules from ancestors if the id is different. However, without this patch, foo/line-color and bar/line-color have the same id and therefore aren't recognised as applying to different instances.
This commit is contained in:
Andy Allan 2012-09-28 16:37:00 +02:00
parent 4a9b5b5939
commit 25343589ab

View File

@ -26,7 +26,7 @@ tree.Rule.prototype.clone = function() {
}; };
tree.Rule.prototype.updateID = function() { tree.Rule.prototype.updateID = function() {
return this.id = this.zoom + '#' + this.name; return this.id = this.zoom + '#' + this.instance + '#' + this.name;
}; };
tree.Rule.prototype.toString = function() { tree.Rule.prototype.toString = function() {