Skip to content
Snippets Groups Projects
Commit a445e4c5 authored by David Sehnal's avatar David Sehnal
Browse files

mol-plugin: warn if viewport canvas changes ref

parent 3dc437b5
No related branches found
No related tags found
No related merge requests found
...@@ -124,7 +124,10 @@ export class Viewport extends PluginComponent<{ }, ViewportState> { ...@@ -124,7 +124,10 @@ export class Viewport extends PluginComponent<{ }, ViewportState> {
return <div className='msp-viewport'> return <div className='msp-viewport'>
<div className='msp-viewport-host3d' ref={elm => this.container = elm}> <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>
</div>; </div>;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment