@@ -4124,8 +4124,8 @@ d3 = function() {
41244124 d3_geo_mercator . invert = function ( x , y ) {
41254125 return [ x , 2 * Math . atan ( Math . exp ( y ) ) - halfπ ] ;
41264126 } ;
4127- function d3_geo_mercatorProjection ( project ) {
4128- var m = d3_geo_projection ( project ) , scale = m . scale , translate = m . translate , clipExtent = m . clipExtent , clipAuto ;
4127+ function d3_geo_mercatorProjection ( m ) {
4128+ var scale = m . scale , translate = m . translate , clipExtent = m . clipExtent , clipAuto ;
41294129 m . scale = function ( ) {
41304130 var v = scale . apply ( m , arguments ) ;
41314131 return v === m ? clipAuto ? m . clipExtent ( null ) : m : v ;
@@ -4149,7 +4149,7 @@ d3 = function() {
41494149 return m . clipExtent ( null ) ;
41504150 }
41514151 ( d3 . geo . mercator = function ( ) {
4152- return d3_geo_mercatorProjection ( d3_geo_mercator ) ;
4152+ return d3_geo_mercatorProjection ( d3_geo_projection ( d3_geo_mercator ) ) ;
41534153 } ) . raw = d3_geo_mercator ;
41544154 var d3_geo_orthographic = d3_geo_azimuthal ( function ( ) {
41554155 return 1 ;
@@ -4165,26 +4165,28 @@ d3 = function() {
41654165 ( d3 . geo . stereographic = function ( ) {
41664166 return d3_geo_projection ( d3_geo_stereographic ) ;
41674167 } ) . raw = d3_geo_stereographic ;
4168- function d3_geo_transverse ( projection ) {
4169- var center = projection . center , rotate = projection . rotate , stream = projection . stream ;
4168+ function d3_geo_transverseProjection ( project ) {
4169+ function transverse ( x , y ) {
4170+ x = project ( x , y ) ;
4171+ y = x [ 0 ] , x [ 0 ] = x [ 1 ] , x [ 1 ] = - y ;
4172+ return x ;
4173+ }
4174+ if ( project . invert ) transverse . invert = function ( x , y ) {
4175+ return project . invert ( - y , x ) ;
4176+ } ;
4177+ var projection = d3_geo_projection ( transverse ) , center = projection . center , rotate = projection . rotate ;
41704178 projection . center = function ( _ ) {
41714179 return _ ? center ( [ - _ [ 1 ] , _ [ 0 ] ] ) : ( _ = center ( ) , [ - _ [ 1 ] , _ [ 0 ] ] ) ;
41724180 } ;
41734181 projection . rotate = function ( _ ) {
41744182 return _ ? rotate ( [ _ [ 0 ] , _ [ 1 ] , _ . length > 2 ? _ [ 2 ] + 90 : 90 ] ) : ( _ = rotate ( ) ,
41754183 [ _ [ 0 ] , _ [ 1 ] , _ [ 2 ] - 90 ] ) ;
41764184 } ;
4177- projection . stream = function ( output ) {
4178- var t = projection . translate ( ) , dx = t [ 0 ] + t [ 1 ] , dy = t [ 0 ] - t [ 1 ] ;
4179- return stream ( d3_geo_transformPoint ( output , function ( x , y ) {
4180- output . point ( dx - y , x - dy ) ;
4181- } ) ) ;
4182- } ;
4183- return projection . rotate ( rotate ( ) ) ;
4185+ return projection . rotate ( [ 0 , 0 ] ) ;
41844186 }
4185- d3 . geo . transverseMercator = function ( ) {
4186- return d3_geo_transverse ( d3 . geo . mercator ( ) ) ;
4187- } ;
4187+ ( d3 . geo . transverseMercator = function ( ) {
4188+ return d3_geo_mercatorProjection ( d3_geo_transverseProjection ( d3_geo_mercator ) ) ;
4189+ } ) . raw = d3_geo_mercator ;
41884190 d3 . geom = { } ;
41894191 function d3_geom_pointX ( d ) {
41904192 return d [ 0 ] ;
0 commit comments