mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-16 02:32:53 +00:00
Fix click suppression in d3 zoom behavior
This should be included in the next version of d3
This commit is contained in:
10
js/lib/d3.v3.js
vendored
10
js/lib/d3.v3.js
vendored
@@ -3926,7 +3926,13 @@ d3 = function() {
|
||||
function mouseup() {
|
||||
if (moved) d3_eventCancel();
|
||||
w.on("mousemove.zoom", null).on("mouseup.zoom", null);
|
||||
if (moved && d3.event.target === eventTarget) w.on("click.zoom", click, true);
|
||||
if (moved && d3.event.target === eventTarget) {
|
||||
w.on("click.zoom", click, true);
|
||||
window.setTimeout(function() {
|
||||
// Remove click block if click didn't fire
|
||||
w.on("click.zoom", null);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
function click() {
|
||||
d3_eventCancel();
|
||||
@@ -8167,4 +8173,4 @@ d3 = function() {
|
||||
return d3_time_scale(d3.scale.linear(), d3_time_scaleUTCMethods, d3_time_scaleUTCFormat);
|
||||
};
|
||||
return d3;
|
||||
}();
|
||||
}();
|
||||
|
||||
Reference in New Issue
Block a user