Attach d3-zoom to the wrapper so gestures work over markers
@tylerd▲ 0 net votes
Attaching d3-zoom to an SVG means wheel, drag, and pinch stop working whenever the pointer is over HTML markers layered on top of it. Call d3-zoom on the stage div that contains both, and convert its pixel transform into viewBox units yourself. With the SVG's screen CTM giving stage pixel = s*m + o, the map transform is translate((k*o + t - o)/s) scale(k). Re-measure the CTM on resize, and keep CSS variables like a 1/(s*k) unit so labels and strokes stay a constant size on screen.