Skip to content

Commit 75d3e7d

Browse files
committed
modify default - add image test
1 parent 639913e commit 75d3e7d

File tree

3 files changed

+85
-3
lines changed

3 files changed

+85
-3
lines changed

src/plots/geo/layout_defaults.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ function handleGeoDefaults(geoLayoutIn, geoLayoutOut, coerce, opts) {
4545
var isConic = geoLayoutOut._isConic = projType.indexOf('conic') !== -1;
4646
var isClipped = geoLayoutOut._isClipped = !!constants.lonaxisSpan[projType];
4747

48-
var visible = coerce('visible');
4948
if(geoLayoutIn.visible === false) {
50-
visible = geoLayoutOut.visible = true;
5149
// should override template.layout.geo.show* - see issue 4482
5250

5351
// make a copy
@@ -68,9 +66,9 @@ function handleGeoDefaults(geoLayoutIn, geoLayoutOut, coerce, opts) {
6866
// set ref to copy
6967
geoLayoutOut._template = newTemplate;
7068
}
69+
var visible = coerce('visible');
7170

7271
var show;
73-
7472
for(var i = 0; i < axesNames.length; i++) {
7573
var axisName = axesNames[i];
7674
var dtickDflt = [30, 10][i];
Loading
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
"data": [
3+
{
4+
"type": "scattergeo",
5+
"marker": {
6+
"opacity": 0.5,
7+
"color": "green",
8+
"size": 100
9+
},
10+
"lon": [
11+
0
12+
],
13+
"lat": [
14+
0
15+
]
16+
},
17+
{
18+
"geo": "geo2",
19+
"type": "scattergeo",
20+
"marker": {
21+
"opacity": 0.5,
22+
"color": "yellow",
23+
"size": 100
24+
},
25+
"lon": [
26+
0
27+
],
28+
"lat": [
29+
0
30+
]
31+
},
32+
{
33+
"geo": "geo3",
34+
"type": "scattergeo",
35+
"marker": {
36+
"opacity": 0.5,
37+
"color": "red",
38+
"size": 100
39+
},
40+
"lon": [
41+
0
42+
],
43+
"lat": [
44+
0
45+
]
46+
}
47+
],
48+
"layout": {
49+
"width": 600,
50+
"height": 800,
51+
"title": {
52+
"text": "geo visible false should override template.layout.geo.show*"
53+
},
54+
"geo": {
55+
"visible": true
56+
},
57+
"geo2": {
58+
"visible": false
59+
},
60+
"geo3": {
61+
"visible": true
62+
},
63+
"template": {
64+
"layout": {
65+
"geo": {
66+
"showcoastlines": true,
67+
"showcountries": true,
68+
"showframe": true,
69+
"showland": true,
70+
"showlakes": true,
71+
"showocean": true,
72+
"showrivers": true,
73+
"showsubunits": true,
74+
"lonaxis": {
75+
"showgrid": true
76+
},
77+
"lataxis": {
78+
"showgrid": true
79+
}
80+
}
81+
}
82+
}
83+
}
84+
}

0 commit comments

Comments
 (0)