@@ -133,21 +133,21 @@ function zoomNonClipped(geo, projection) {
133133 function handleZoomstart ( ) {
134134 d3 . select ( this ) . style ( zoomstartStyle ) ;
135135
136- const { bottom , left , right , top } = this . getBoundingClientRect ( )
136+ var rect = this . getBoundingClientRect ( )
137137 mouse0 = d3 . event . sourceEvent
138138 ? d3 . mouse ( this )
139- : [ ( left + right ) / 2 , ( bottom + top ) / 2 ] ;
139+ : [ ( rect . left + rect . right ) / 2 , ( rect . bottom + rect . top ) / 2 ] ;
140140 rotate0 = projection . rotate ( ) ;
141141 translate0 = projection . translate ( ) ;
142142 lastRotate = rotate0 ;
143143 zoomPoint = position ( mouse0 ) ;
144144 }
145145
146146 function handleZoom ( ) {
147- const { bottom , left , right , top } = this . getBoundingClientRect ( )
147+ var rect = this . getBoundingClientRect ( )
148148 mouse1 = d3 . event . sourceEvent
149149 ? d3 . mouse ( this )
150- : [ ( left + right ) / 2 , ( bottom + top ) / 2 ] ;
150+ : [ ( rect . left + rect . right ) / 2 , ( rect . bottom + rect . top ) / 2 ] ;
151151 if ( outside ( mouse0 ) ) {
152152 zoom . scale ( projection . scale ( ) ) ;
153153 zoom . translate ( projection . translate ( ) ) ;
@@ -216,10 +216,10 @@ function zoomClipped(geo, projection) {
216216 zoom . on ( 'zoomstart' , function ( ) {
217217 d3 . select ( this ) . style ( zoomstartStyle ) ;
218218
219- const { bottom , left , right , top } = this . getBoundingClientRect ( )
220- let mouse0 = d3 . event . sourceEvent
219+ var rect = this . getBoundingClientRect ( )
220+ var mouse0 = d3 . event . sourceEvent
221221 ? d3 . mouse ( this )
222- : [ ( left + right ) / 2 , ( bottom + top ) / 2 ] ;
222+ : [ ( rect . left + rect . right ) / 2 , ( rect . bottom + rect . top ) / 2 ] ;
223223 var rotate0 = projection . rotate ( ) ;
224224 var lastRotate = rotate0 ;
225225 var translate0 = projection . translate ( ) ;
@@ -228,10 +228,10 @@ function zoomClipped(geo, projection) {
228228 zoomPoint = position ( projection , mouse0 ) ;
229229
230230 zoomOn . call ( zoom , 'zoom' , function ( ) {
231- const { bottom , left , right , top } = this . getBoundingClientRect ( )
232- let mouse1 = d3 . event . sourceEvent
231+ var rect = this . getBoundingClientRect ( )
232+ var mouse1 = d3 . event . sourceEvent
233233 ? d3 . mouse ( this )
234- : [ ( left + right ) / 2 , ( bottom + top ) / 2 ] ;
234+ : [ ( rect . left + rect . right ) / 2 , ( rect . bottom + rect . top ) / 2 ] ;
235235
236236 projection . scale ( view . k = d3 . event . scale ) ;
237237
0 commit comments