Sunday 15 January 2012

angularjs - d3.event returns an error -



angularjs - d3.event returns an error -

plunk here

on " first " page, there circle , label label should draggable while page on own problem arises when set page in angular framework, homecoming following:

uncaught typeerror: cannot read property 'x' of null

is there missing? new angular , d3, please help thanks.

here relevant code drag function:

function dragged(d) { var x = d3.event.x, y = d3.event.y, textid = this.id, lineid = 'line' + textid.slice(4,textid.length); console.log(d3.event); d3.select(this) .attr("x", x) .attr("y", y); d3.select("#"+ lineid) .attr("x2", x) .attr("y2", y); }

delete d3 reference in individual html suggested fernoftheandes

angularjs d3.js

No comments:

Post a Comment