Update leenkx/blender/lnx/write_data.py
This commit is contained in:
		| @ -579,9 +579,20 @@ def write_indexhtml(w, h, is_publish): | ||||
|     <canvas style="object-fit: contain;  min-width: 100%;  max-width: 100%;  max-height: 100vh;  min-height: 100vh; display: block;" id='khanvas' tabindex='-1'""" + str(popupmenu_in_browser) + """></canvas> | ||||
| """) | ||||
|         else: | ||||
|             f.write(""" | ||||
|             if wrd.lnx_winmode != 'Headless': | ||||
|                 f.write(""" | ||||
|     <p align="center"><canvas align="center" style="outline: none;" id='khanvas' width='""" + str(w) + """' height='""" + str(h) + """' tabindex='-1'""" + str(popupmenu_in_browser) + """></canvas></p> | ||||
| """) | ||||
| """)      | ||||
|             else: | ||||
|                 f.write(""" | ||||
|     <canvas align="center" style="display: none;" id='khanvas' width='""" + str(w) + """' height='""" + str(h) + """' tabindex='-1'""" + str(popupmenu_in_browser) + """></canvas> | ||||
|     <script> | ||||
|         // Quick solution for headless mode only for HTML target | ||||
|         window.onload = function() { | ||||
|             document.getElementById('khanvas').remove(); | ||||
|         } | ||||
|     </script> | ||||
| """)        | ||||
|         f.write(""" | ||||
|     <script src='kha.js'></script> | ||||
| </body> | ||||
|  | ||||
		Reference in New Issue
	
	Block a user