()
| 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); |