Skip to content

Chapter 14 - Dragging event #50

@dung-phan

Description

@dung-phan

Original code:
var dragging = function(d) {
//Log out d3.event, so you can see all the goodies inside
//console.log(d3.event);

It should be function(e,d) and console.log(e) and using e (event) to get access to dx and dy.

Also I have a question:
svg.selectAll("path") .attr("d", path);
Paths and circles in this example (p.301) are updated on svg instead of map which contains the group. Should it be map instead or it shouldn't matter here?
Thanks a lot!

Metadata

Metadata

Assignees

Labels

next book updateTo incorporate on the next update to the bookv5This needs revision for D3 v5.x

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions