diff --git a/src/mol-plugin/ui/viewport.tsx b/src/mol-plugin/ui/viewport.tsx index e33496c5852dddff1df0bd75fc88945beb170217..db26d7c4030de23e9463ed4864bc9a206ce003a4 100644 --- a/src/mol-plugin/ui/viewport.tsx +++ b/src/mol-plugin/ui/viewport.tsx @@ -124,7 +124,10 @@ export class Viewport extends PluginComponent<{ }, ViewportState> { return <div className='msp-viewport'> <div className='msp-viewport-host3d' ref={elm => this.container = elm}> - <canvas ref={elm => this.canvas = elm}></canvas> + <canvas ref={elm => { + if (!!this.canvas && this.canvas !== elm) console.warn('changed viewport canvas') + this.canvas = elm + }} /> </div> </div>; }