如何解决在d3 v6中拖动形状
当我尝试拖动矩形时什么也没有发生。 (相反,鼠标悬停事件可以正常工作)。为什么不拖动注册?
svg.append("rect")
.attr("x",100)
.attr("y",100)
.attr("width",50)
.attr("height",50)
.style("fill","firebrick")
//.on("mouseover",function(d) { d3.select(this).attr("height",100); } )
//.on("mouseout",50); } )
//.select(this).call(drag)
.on("drag",function() {
d3.select(this)
.attr("x",d3.event.x + current.attr("x"))
.attr("y",d3.event.y + current.attr("y"))
});
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。