Set zoom click distance to 10px

prevents a glitch that occurs when clicking on nodes - instead of
seeting the click event, the view moves by few pixes and task is not selected
This commit is contained in:
Standa Lukeš 2020-09-30 22:06:02 +00:00
parent 8c99862103
commit 31c91be77c

View file

@ -104,7 +104,7 @@
function zoomed(e) {
svg.attr("transform", e.transform);
}
const zoomer = d3.zoom().scaleExtent([0.1, 2])
const zoomer = d3.zoom().scaleExtent([0.1, 2]).clickDistance(10)
zoomer.on("zoom", zoomed);
d3.select(container).call(zoomer);
});