Skip to content
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
2 changes: 1 addition & 1 deletion src/components/drawing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ drawing.setClipUrl = function(s, localId, gd) {
}

var context = gd._context;
var baseUrl = context.staticPlot ? '' : (context.baseUrl || '');
var baseUrl = context.exportedPlot ? '' : (context.baseUrl || '');

s.attr('clip-path', 'url(' + baseUrl + '#' + localId + ')');
};
Expand Down
1 change: 1 addition & 0 deletions src/plot_api/to_image.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ function toImage(gd, opts) {
// extend config for static plot
var configImage = Lib.extendFlat({}, config, {
staticPlot: true,
exportedPlot: true,
setBackground: setBackground
});

Expand Down
2 changes: 1 addition & 1 deletion test/jasmine/tests/snapshot_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ describe('Plotly.Snapshot', function() {
.append('base')
.attr('href', 'https://plot.ly');

Plotly.plot(gd, [{ y: [1, 2, 1] }], {}, {staticPlot: true})
Plotly.plot(gd, [{ y: [1, 2, 1] }], {}, {exportedPlot: true})
.then(function() { return Plotly.Snapshot.toSVG(gd); })
.then(function(svg) {
var svgDOM = parser.parseFromString(svg, 'image/svg+xml');
Expand Down