fix: Mercator stays at [0,15], dynamic center only for orthographic
This commit is contained in:
@@ -551,10 +551,9 @@ function WorldMap(selection) {
|
|||||||
}
|
}
|
||||||
function setProjection(type) {
|
function setProjection(type) {
|
||||||
if (type === 'mercator') {
|
if (type === 'mercator') {
|
||||||
var ctr = getBestCenter();
|
|
||||||
const bScale = baseScale();
|
const bScale = baseScale();
|
||||||
projection = d3.geoMercator()
|
projection = d3.geoMercator()
|
||||||
.center(ctr)
|
.center([0, 15])
|
||||||
.scale(bScale)
|
.scale(bScale)
|
||||||
.translate([innerW() / 2, height / 1.5]);
|
.translate([innerW() / 2, height / 1.5]);
|
||||||
} else if (type === 'orthographic') {
|
} else if (type === 'orthographic') {
|
||||||
|
|||||||
Reference in New Issue
Block a user