Skip to content

Commit 62b9153

Browse files
committed
Merge branch 'force_layout_exports_drag' of https://github.com/GerHobbelt/d3 into fix-force-drag
2 parents 183060d + fffbb81 commit 62b9153

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

d3.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4269,7 +4269,8 @@
42694269
return force.alpha(0);
42704270
};
42714271
force.drag = function() {
4272-
if (!drag) drag = d3.behavior.drag().origin(d3_identity).on("dragstart", d3_layout_forceDragstart).on("drag", dragmove).on("dragend", d3_layout_forceDragend);
4272+
if (!arguments.length) return drag;
4273+
if (!drag) drag = d3.behavior.drag().origin(d3_identity).on("dragstart.force", d3_layout_forceDragstart).on("drag.force", dragmove).on("dragend.force", d3_layout_forceDragend);
42734274
this.on("mouseover.force", d3_layout_forceMouseover).on("mouseout.force", d3_layout_forceMouseout).call(drag);
42744275
};
42754276
function dragmove(d) {

0 commit comments

Comments
 (0)