diff --git a/cubism.v1.js b/cubism.v1.js index 15eeb3c..177b68b 100644 --- a/cubism.v1.js +++ b/cubism.v1.js @@ -1004,8 +1004,8 @@ cubism_contextPrototype.rule = function() { }); context.on("focus.rule-" + id, function(i) { - line.datum(i) - .style("display", i == null ? "none" : null) + line.datum().i = i; + line.style("display", i == null ? "none" : null) .style("left", i == null ? null : cubism_ruleLeft); }); } @@ -1039,7 +1039,7 @@ function cubism_ruleStyle(line) { .style("pointer-events", "none"); } -function cubism_ruleLeft(i) { - return i + "px"; +function cubism_ruleLeft(d) { + return d.i + "px"; } })(this);