File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,9 @@ exports.plot = function plotGl2d(gd) {
50
50
// If Scene is not instantiated, create one!
51
51
if ( scene === undefined ) {
52
52
scene = new Scene2D ( {
53
- container : gd . querySelector ( '.gl-container' ) ,
54
53
id : subplotId ,
54
+ graphDiv : gd ,
55
+ container : gd . querySelector ( '.gl-container' ) ,
55
56
staticPlot : gd . _context . staticPlot ,
56
57
plotGlPixelRatio : gd . _context . plotGlPixelRatio
57
58
} ,
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ var STATIC_CANVAS, STATIC_CONTEXT;
27
27
28
28
function Scene2D ( options , fullLayout ) {
29
29
this . container = options . container ;
30
+ this . graphDiv = options . graphDiv ;
30
31
this . pixelRatio = options . plotGlPixelRatio || window . devicePixelRatio ;
31
32
this . id = options . id ;
32
33
this . staticPlot = ! ! options . staticPlot ;
@@ -275,7 +276,7 @@ var relayoutCallback = function(scene) {
275
276
xrange : scene . xaxis . range . slice ( 0 ) ,
276
277
yrange : scene . yaxis . range . slice ( 0 )
277
278
} ;
278
- scene . container . parentElement . parentElement . parentElement . emit ( 'plotly_relayout' , update ) ;
279
+ scene . graphDiv . emit ( 'plotly_relayout' , update ) ;
279
280
} ;
280
281
281
282
proto . cameraChanged = function ( ) {
You can’t perform that action at this time.
0 commit comments