square/cubism — pull request #40 by peferron (2012-12-29 20:56:43+00:00)
Title: Fixed bug on rule.remove

context.rule creates a line with the datum {id: id}.

In the rule focus handler, this whole datum is set to an integer i, and the id is lost.

rule.remove will then throw an error because it tries to access d.id (with d being the datum) but the datum is just an integer now and has no 'id' property.

The fix consists of simply adding the integer i as an additional property of the datum instead of completely replacing it.