MCPcopy Create free account
hub / github.com/plotly/plotly.js / handleZoom

Function handleZoom

src/plots/geo/zoom.js:76–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74 }
75
76 function handleZoom() {
77 projection
78 .scale(d3.event.scale)
79 .translate(d3.event.translate);
80 geo.render(true);
81
82 var center = projection.invert(geo.midPt);
83 geo.graphDiv.emit('plotly_relayouting', {
84 'geo.projection.scale': projection.scale() / geo.fitScale,
85 'geo.center.lon': center[0],
86 'geo.center.lat': center[1]
87 });
88 }
89
90 function syncCb(set) {
91 var center = projection.invert(geo.midPt);

Callers

nothing calls this directly

Calls 2

outsideFunction · 0.85
positionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…