nl_tokens: Determines a new scale that fits the entire graph into view .
pl_tokens: function zoomFit ( ) { var bounds = graph . node ( ) . getBBox ( ) ; var <mask> = graph . node ( ) . parentElement ; var fullWidth = parent . clientWidth , fullHeight = parent . clientHeight ; var width = bounds . width , height = bounds . height ; if ( width === 0 || height === 0 ) { return 1 ; } // nothing to fit var scale = 0.75 / Math . max ( width / fullWidth , height / fullHeight ) ; scale = Math . max ( Math . min ( scale , maxScaleExtent ) , minScaleExtent ) ; return scale ; }