-
-
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 1 commit
4b1c90e
7e62ce4
1b905a1
639913e
75d3e7d
9448c8f
ca9200b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -688,6 +688,51 @@ describe('Test Geo layout defaults', function() { | |
}); | ||
}); | ||
|
||
describe('geo visible false', function() { | ||
var gd; | ||
|
||
beforeEach(function() { gd = createGraphDiv(); }); | ||
|
||
afterEach(destroyGraphDiv); | ||
|
||
it('should override template.layout.geo.show*', function(done) { | ||
var keys = [ | ||
'showcoastlines', | ||
'showcountries', | ||
'showframe', | ||
'showland', | ||
'showlakes', | ||
'showocean', | ||
'showrivers', | ||
'showsubunits' | ||
]; | ||
|
||
var layout = { | ||
geo: { visible: false }, | ||
template: { | ||
layout: { | ||
geo: {} | ||
} | ||
} | ||
}; | ||
|
||
keys.forEach(function(k) { | ||
layout.template.layout.geo[k] = true; | ||
}); | ||
|
||
var data = [{ lon: [0], lat: [0], type: 'scattergeo' }]; | ||
|
||
Plotly.plot(gd, data, layout) | ||
.then(function() { | ||
keys.forEach(function(k) { | ||
expect(gd._fullLayout.template.layout.geo[k]).toBe(false, k); | ||
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. At the end of the day we don't care what's in 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. Good call. Fixed by 7e62ce4. |
||
}); | ||
}) | ||
.catch(failTest) | ||
.then(done); | ||
}); | ||
}); | ||
|
||
describe('geojson / topojson utils', function() { | ||
function _locationToFeature(topojson, loc, locationmode) { | ||
var trace = { locationmode: locationmode }; | ||
|
Uh oh!
There was an error while loading. Please reload this page.