File tree Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Original file line number Diff line number Diff line change @@ -660,7 +660,6 @@ proto.render = function() {
660
660
661
661
// Helper that wraps d3[geo + /* Projection name /*]() which:
662
662
//
663
- // - adds 'fitExtent' (available in d3 v4)
664
663
// - adds 'getPath', 'getBounds' convenience methods
665
664
// - scopes logic related to 'clipAngle'
666
665
// - adds 'isLonLatOverEdges' method
@@ -716,31 +715,6 @@ function getProjection(geoLayout) {
716
715
return projection . getPath ( ) . bounds ( object ) ;
717
716
} ;
718
717
719
- // adapted from d3 v4:
720
- // https://github.com/d3/d3-geo/blob/master/src/projection/fit.js
721
- projection . fitExtent = function ( extent , object ) {
722
- var w = extent [ 1 ] [ 0 ] - extent [ 0 ] [ 0 ] ;
723
- var h = extent [ 1 ] [ 1 ] - extent [ 0 ] [ 1 ] ;
724
- var clip = projection . clipExtent && projection . clipExtent ( ) ;
725
-
726
- projection
727
- . scale ( 150 )
728
- . translate ( [ 0 , 0 ] ) ;
729
-
730
- if ( clip ) projection . clipExtent ( null ) ;
731
-
732
- var b = projection . getBounds ( object ) ;
733
- var k = Math . min ( w / ( b [ 1 ] [ 0 ] - b [ 0 ] [ 0 ] ) , h / ( b [ 1 ] [ 1 ] - b [ 0 ] [ 1 ] ) ) ;
734
- var x = + extent [ 0 ] [ 0 ] + ( w - k * ( b [ 1 ] [ 0 ] + b [ 0 ] [ 0 ] ) ) / 2 ;
735
- var y = + extent [ 0 ] [ 1 ] + ( h - k * ( b [ 1 ] [ 1 ] + b [ 0 ] [ 1 ] ) ) / 2 ;
736
-
737
- if ( clip ) projection . clipExtent ( clip ) ;
738
-
739
- return projection
740
- . scale ( k * 150 )
741
- . translate ( [ x , y ] ) ;
742
- } ;
743
-
744
718
projection . precision ( constants . precision ) ;
745
719
746
720
if ( clipAngle ) {
You can’t perform that action at this time.
0 commit comments