11! function ( ) {
22 var d3 = {
3- version : "3.4.9 "
3+ version : "3.4.10 "
44 } ;
55 if ( ! Date . now ) Date . now = function ( ) {
66 return + new Date ( ) ;
12271227 x : 0 ,
12281228 y : 0 ,
12291229 k : 1
1230- } , translate0 , center , size = [ 960 , 500 ] , scaleExtent = d3_behavior_zoomInfinity , mousedown = "mousedown.zoom" , mousemove = "mousemove.zoom" , mouseup = "mouseup.zoom" , mousewheelTimer , touchstart = "touchstart.zoom" , touchtime , event = d3_eventDispatch ( zoom , "zoomstart" , "zoom" , "zoomend" ) , x0 , x1 , y0 , y1 ;
1230+ } , translate0 , center0 , center , size = [ 960 , 500 ] , scaleExtent = d3_behavior_zoomInfinity , mousedown = "mousedown.zoom" , mousemove = "mousemove.zoom" , mouseup = "mouseup.zoom" , mousewheelTimer , touchstart = "touchstart.zoom" , touchtime , event = d3_eventDispatch ( zoom , "zoomstart" , "zoom" , "zoomend" ) , x0 , x1 , y0 , y1 ;
12311231 function zoom ( g ) {
1232- g . on ( mousedown , mousedowned ) . on ( d3_behavior_zoomWheel + ".zoom" , mousewheeled ) . on ( mousemove , mousewheelreset ) . on ( "dblclick.zoom" , dblclicked ) . on ( touchstart , touchstarted ) ;
1232+ g . on ( mousedown , mousedowned ) . on ( d3_behavior_zoomWheel + ".zoom" , mousewheeled ) . on ( "dblclick.zoom" , dblclicked ) . on ( touchstart , touchstarted ) ;
12331233 }
12341234 zoom . event = function ( g ) {
12351235 g . each ( function ( ) {
13711371 zoomed ( dispatch ) ;
13721372 }
13731373 function ended ( ) {
1374- subject . on ( mousemove , d3_window === that ? mousewheelreset : null ) . on ( mouseup , null ) ;
1374+ subject . on ( mousemove , null ) . on ( mouseup , null ) ;
13751375 dragRestore ( dragged && d3 . event . target === target ) ;
13761376 zoomended ( dispatch ) ;
13771377 }
14491449 }
14501450 function mousewheeled ( ) {
14511451 var dispatch = event . of ( this , arguments ) ;
1452- if ( mousewheelTimer ) clearTimeout ( mousewheelTimer ) ; else d3_selection_interrupt . call ( this ) ,
1453- zoomstarted ( dispatch ) ;
1452+ if ( mousewheelTimer ) clearTimeout ( mousewheelTimer ) ; else translate0 = location ( center0 = center || d3 . mouse ( this ) ) ,
1453+ d3_selection_interrupt . call ( this ) , zoomstarted ( dispatch ) ;
14541454 mousewheelTimer = setTimeout ( function ( ) {
14551455 mousewheelTimer = null ;
14561456 zoomended ( dispatch ) ;
14571457 } , 50 ) ;
14581458 d3_eventPreventDefault ( ) ;
1459- var point = center || d3 . mouse ( this ) ;
1460- if ( ! translate0 ) translate0 = location ( point ) ;
14611459 scaleTo ( Math . pow ( 2 , d3_behavior_zoomDelta ( ) * .002 ) * view . k ) ;
1462- translateTo ( point , translate0 ) ;
1460+ translateTo ( center0 , translate0 ) ;
14631461 zoomed ( dispatch ) ;
14641462 }
1465- function mousewheelreset ( ) {
1466- translate0 = null ;
1467- }
14681463 function dblclicked ( ) {
14691464 var dispatch = event . of ( this , arguments ) , p = d3 . mouse ( this ) , l = location ( p ) , k = Math . log ( view . k ) / Math . LN2 ;
14701465 zoomstarted ( dispatch ) ;
92339228 d3 . xml = d3_xhrType ( function ( request ) {
92349229 return request . responseXML ;
92359230 } ) ;
9236- if ( typeof define === "function" && define . amd ) {
9237- define ( d3 ) ;
9238- } else if ( typeof module === "object" && module . exports ) {
9239- module . exports = d3 ;
9240- } else {
9241- this . d3 = d3 ;
9242- }
9231+ if ( typeof define === "function" && define . amd ) define ( d3 ) ; else if ( typeof module === "object" && module . exports ) module . exports = d3 ;
9232+ this . d3 = d3 ;
92439233} ( ) ;
0 commit comments