diff --git a/Sources/layouts/Layout2D.js b/Sources/layouts/Layout2D.js index ff08efda..b59fc74f 100644 --- a/Sources/layouts/Layout2D.js +++ b/Sources/layouts/Layout2D.js @@ -56,6 +56,10 @@ export default class Layout2D extends React.Component { this.view.resetCamera(); setTimeout(this.view.resize, 500); + + // set mousedown capture on containers after view.setContainer. + this.container.addEventListener('mousedown', this.activateView, true); + this.sliderContainer.addEventListener('mousedown', this.activateView, true); } componentWillUnmount() { diff --git a/Sources/layouts/Layout3D.js b/Sources/layouts/Layout3D.js index 3a41c24b..a403e793 100644 --- a/Sources/layouts/Layout3D.js +++ b/Sources/layouts/Layout3D.js @@ -29,6 +29,9 @@ export default class Layout3D extends React.Component { this.view.resetCamera(); setTimeout(this.view.resize, 500); + + // set mousedown capture on container after view.setContainer. + this.container.addEventListener('mousedown', this.activateView, true); } componentWillUnmount() {