nl_tokens: Handles clicks on zoom control buttons and invokes centerGraph with new scale value .
pl_tokens: function onControlZoomClicked ( ) { var newScale = 1 ; var scalePercentile = 0.20 ; // Add or subtract scale percentile from current scale value. switch ( $ ( this ) . data ( 'action' ) ) { case 'zoom_in' : newScale = Math . max ( Math . min ( zoom . <mask> ( ) * ( 1 + scalePercentile ) , maxScaleExtent ) , minScaleExtent ) ; break ; case 'zoom_out' : newScale = Math . max ( zoom . scale ( ) * ( 1 - scalePercentile ) , minScaleExtent ) ; break ; case 'zoom_all_out' : newScale = zoomFit ( ) ; break ; } centerGraph ( newScale ) ; }