Skip to content

Commit c759396

Browse files
committed
added a getter and setter
1 parent 5b8406a commit c759396

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/plots/gl3d/scene.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,7 @@ function Scene(options, fullLayout) {
355355

356356
initializeGLPlot(this, camera, this.pixelRatio);
357357

358-
// enable mouse listener which was disabled at camera init
359-
this.camera.mouseListener.enabled = true;
358+
this.enableGLCameraMouseListener();
360359
}
361360

362361
var proto = Scene.prototype;
@@ -376,7 +375,14 @@ proto.initializeGLCamera = function() {
376375
mode: 'orbit'
377376
});
378377

379-
// Note: we shoule disable camera interactions until the scene is complete
378+
this.disableGLCameraMouseListener();
379+
};
380+
381+
proto.enableGLCameraMouseListener = function() {
382+
this.camera.mouseListener.enabled = true;
383+
};
384+
385+
proto.disableGLCameraMouseListener = function() {
380386
this.camera.mouseListener.enabled = false;
381387
};
382388

0 commit comments

Comments
 (0)