Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Mapbox to image context #1598

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

Merged
merged 2 commits into from
Apr 14, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
pass context mapbox access token during cloneplot
- so that toImage works when token is set in config
  argument.
  • Loading branch information
etpinard committed Apr 13, 2017
commit 7cf69e26488bcd5bdce158904399b8a5e76796a5
4 changes: 3 additions & 1 deletion 4 src/snapshot/cloneplot.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ module.exports = function clonePlot(graphObj, options) {
var oldLayout = graphObj.layout;
var newData = extendDeep([], oldData);
var newLayout = extendDeep({}, oldLayout, cloneLayoutOverride(options.tileClass));
var context = graphObj._context || {};

if(options.width) newLayout.width = options.width;
if(options.height) newLayout.height = options.height;
Expand Down Expand Up @@ -153,7 +154,8 @@ module.exports = function clonePlot(graphObj, options) {
options.plotGlPixelRatio,
displaylogo: options.displaylogo || false,
showLink: options.showLink || false,
showTips: options.showTips || false
showTips: options.showTips || false,
mapboxAccessToken: context.mapboxAccessToken
}
};

Expand Down
3 changes: 2 additions & 1 deletion 3 test/jasmine/tests/snapshot_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ describe('Plotly.Snapshot', function() {
displaylogo: false,
showLink: false,
showTips: false,
setBackground: 'opaque'
setBackground: 'opaque',
mapboxAccessToken: undefined
};

var themeTile = Plotly.Snapshot.clone(dummyGraphObj, themeOptions);
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.