-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
geo.visible false should override template.layout.geo.show* #4483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
4b1c90e
7e62ce4
1b905a1
639913e
75d3e7d
9448c8f
ca9200b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -624,7 +624,7 @@ describe('Test Geo layout defaults', function() { | |
}); | ||
}); | ||
|
||
describe('geo.visible should override show* defaults', function() { | ||
describe('geo.visible should override show* defaults even with template any show* is true', function() { | ||
var keys = [ | ||
'lonaxis.showgrid', | ||
'lataxis.showgrid', | ||
|
@@ -650,39 +650,93 @@ describe('Test Geo layout defaults', function() { | |
}); | ||
} | ||
|
||
it('- base case', function() { | ||
layoutIn = { | ||
geo: { visible: false } | ||
}; | ||
[true, false, undefined].forEach(function(q) { | ||
it('- base case | ' + q, function() { | ||
layoutIn = { | ||
template: { | ||
layout: { | ||
geo: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry to be a pain, but I still don't see a test case that sets There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added in 9448c8f. |
||
showcoastlines: q, | ||
showcountries: q, | ||
showframe: q, | ||
showland: q, | ||
showlakes: q, | ||
showocean: q, | ||
showrivers: q, | ||
showsubunits: q, | ||
lonaxis: { showgrid: q }, | ||
lataxis: { showgrid: q } | ||
} | ||
} | ||
}, | ||
geo: { visible: false } | ||
}; | ||
|
||
supplyLayoutDefaults(layoutIn, layoutOut, fullData); | ||
_assert({ | ||
showsubunits: undefined | ||
supplyLayoutDefaults(layoutIn, layoutOut, fullData); | ||
_assert({ | ||
showsubunits: undefined | ||
}); | ||
}); | ||
}); | ||
|
||
it('- scoped case', function() { | ||
layoutIn = { | ||
geo: { scope: 'europe', visible: false } | ||
}; | ||
[true, false, undefined].forEach(function(q) { | ||
it('- scoped case', function() { | ||
layoutIn = { | ||
template: { | ||
layout: { | ||
geo: { | ||
showcoastlines: q, | ||
showcountries: q, | ||
showframe: q, | ||
showland: q, | ||
showlakes: q, | ||
showocean: q, | ||
showrivers: q, | ||
showsubunits: q, | ||
lonaxis: { showgrid: q }, | ||
lataxis: { showgrid: q } | ||
} | ||
} | ||
}, | ||
geo: { scope: 'europe', visible: false } | ||
}; | ||
|
||
supplyLayoutDefaults(layoutIn, layoutOut, fullData); | ||
_assert({ | ||
showframe: undefined, | ||
showsubunits: undefined | ||
supplyLayoutDefaults(layoutIn, layoutOut, fullData); | ||
_assert({ | ||
showframe: undefined, | ||
showsubunits: undefined | ||
}); | ||
}); | ||
}); | ||
|
||
it('- scope:usa case', function() { | ||
layoutIn = { | ||
geo: { scope: 'usa', visible: false } | ||
}; | ||
[true, false, undefined].forEach(function(q) { | ||
it('- scope:usa case', function() { | ||
layoutIn = { | ||
template: { | ||
layout: { | ||
geo: { | ||
showcoastlines: q, | ||
showcountries: q, | ||
showframe: q, | ||
showland: q, | ||
showlakes: q, | ||
showocean: q, | ||
showrivers: q, | ||
showsubunits: q, | ||
lonaxis: { showgrid: q }, | ||
lataxis: { showgrid: q } | ||
} | ||
} | ||
}, | ||
geo: { scope: 'usa', visible: false } | ||
}; | ||
|
||
supplyLayoutDefaults(layoutIn, layoutOut, fullData); | ||
_assert({ | ||
showframe: undefined, | ||
showcoastlines: undefined, | ||
showocean: undefined | ||
supplyLayoutDefaults(layoutIn, layoutOut, fullData); | ||
_assert({ | ||
showframe: undefined, | ||
showcoastlines: undefined, | ||
showocean: undefined | ||
}); | ||
}); | ||
}); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we setting
geoLayoutOut.visible = true
here? Looks to me as though it doesn't matter for the end result, is that right? RCE would want thefalse
to remain intact.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad.