mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-22 11:46:11 +02:00
Fix click suppression in d3 zoom behavior
This should be included in the next version of d3
This commit is contained in:
Vendored
+7
-1
@@ -3926,7 +3926,13 @@ d3 = function() {
|
|||||||
function mouseup() {
|
function mouseup() {
|
||||||
if (moved) d3_eventCancel();
|
if (moved) d3_eventCancel();
|
||||||
w.on("mousemove.zoom", null).on("mouseup.zoom", null);
|
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() {
|
function click() {
|
||||||
d3_eventCancel();
|
d3_eventCancel();
|
||||||
|
|||||||
Reference in New Issue
Block a user