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) {
5050 // If Scene is not instantiated, create one!
5151 if ( scene === undefined ) {
5252 scene = new Scene2D ( {
53- container : gd . querySelector ( '.gl-container' ) ,
5453 id : subplotId ,
54+ graphDiv : gd ,
55+ container : gd . querySelector ( '.gl-container' ) ,
5556 staticPlot : gd . _context . staticPlot ,
5657 plotGlPixelRatio : gd . _context . plotGlPixelRatio
5758 } ,
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ var STATIC_CANVAS, STATIC_CONTEXT;
2727
2828function Scene2D ( options , fullLayout ) {
2929 this . container = options . container ;
30+ this . graphDiv = options . graphDiv ;
3031 this . pixelRatio = options . plotGlPixelRatio || window . devicePixelRatio ;
3132 this . id = options . id ;
3233 this . staticPlot = ! ! options . staticPlot ;
@@ -275,7 +276,7 @@ var relayoutCallback = function(scene) {
275276 xrange : scene . xaxis . range . slice ( 0 ) ,
276277 yrange : scene . yaxis . range . slice ( 0 )
277278 } ;
278- scene . container . parentElement . parentElement . parentElement . emit ( 'plotly_relayout' , update ) ;
279+ scene . graphDiv . emit ( 'plotly_relayout' , update ) ;
279280} ;
280281
281282proto . cameraChanged = function ( ) {
You can’t perform that action at this time.
0 commit comments