Skip to content

Commit e7a94ed

Browse files
committed
pass 'staticPlot' and 'plotGlPixelRatio' to Scene2D constructor
1 parent 5afd34f commit e7a94ed

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

shelly/plotlyjs/static/plotlyjs/src/gl2d/scene2d.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ Plotly.Plots.registerSubplot('gl2d', ['xaxis', 'yaxis'], ['x', 'y'],
1616
function Scene2D(options, fullLayout) {
1717
var container = this.container = options.container;
1818

19+
this.pixelRatio = options.plotGlPixelRatio || window.devicePixelRatio;
1920
this.id = options.id;
21+
this.staticPlot = !!options.staticPlot;
2022
this.fullLayout = fullLayout;
2123
this.updateAxes(fullLayout);
2224

shelly/plotlyjs/static/plotlyjs/src/graph_obj.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,9 @@ function plotGl2d(gd) {
860860
if(scene === undefined) {
861861
scene = new Plotly.Scene2D({
862862
container: gd.querySelector('.gl-container'),
863-
id: subplotId
863+
id: subplotId,
864+
staticPlot: gd._context.staticPlot,
865+
plotGlPixelRatio: gd._context.plotGlPixelRatio
864866
},
865867
fullLayout
866868
);

0 commit comments

Comments
 (0)