Skip to content

Commit c66f7cc

Browse files
committed
chore: use dflt: -1 instad of null
1 parent ba04d0e commit c66f7cc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/components/modebar/buttons.js

+1
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ function handleGeo(gd, ev) {
551551
var minscale = geoLayout.projection.minscale;
552552
var maxscale = geoLayout.projection.maxscale;
553553

554+
if(maxscale < 0) maxscale = Infinity;
554555
var newScale = (val === 'in') ? 2 * scale : 0.5 * scale;
555556

556557
// make sure the scale is within the min/max bounds

src/plots/geo/layout_attributes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ var attrs = module.exports = overrideAll({
192192
valType: 'number',
193193
role: 'info',
194194
min: 0,
195-
dflt: null,
195+
dflt: -1,
196196
description: [
197197
'Maximal zoom level of the map view.',
198198
'A maxScale of *2* (200%) corresponds to a zoom level',

0 commit comments

Comments
 (0)