@@ -299,6 +299,10 @@ <h2 id="results"><a name="results"></a>Results</h2>
299299 applications, but may be noticeable in regions with steep temperature gradients.
300300 </ p >
301301
302+ < div id ="orientation-message ">
303+ Cannot draw the results. Please rotate your phone to landscape orientation and refresh the page to see
304+ the results.
305+ </ div >
302306 < div id ="resultsCanvas "> </ div >
303307
304308 < ul id ="menu ">
@@ -324,6 +328,14 @@ <h2 id="results"><a name="results"></a>Results</h2>
324328 // } from "../../FEAScript-core/src/index.js";
325329
326330 window . addEventListener ( "DOMContentLoaded" , async ( ) => {
331+ if ( window . innerHeight > window . innerWidth ) {
332+ document . getElementById ( "orientation-message" ) . style . display = "block" ;
333+ document . getElementById ( "resultsCanvas" ) . style . display = "none" ;
334+ } else {
335+ document . getElementById ( "orientation-message" ) . style . display = "none" ;
336+ document . getElementById ( "resultsCanvas" ) . style . display = "block" ;
337+ }
338+
327339 // Enable debug logging mode
328340 //logSystem("debug");
329341
@@ -381,6 +393,16 @@ <h2 id="results"><a name="results"></a>Results</h2>
381393 "unstructured"
382394 ) ;
383395 } ) ;
396+
397+ window . addEventListener ( "resize" , ( ) => {
398+ if ( window . innerHeight > window . innerWidth ) {
399+ document . getElementById ( "orientation-message" ) . style . display = "block" ;
400+ document . getElementById ( "resultsCanvas" ) . style . display = "none" ;
401+ } else {
402+ document . getElementById ( "orientation-message" ) . style . display = "none" ;
403+ document . getElementById ( "resultsCanvas" ) . style . display = "block" ;
404+ }
405+ } ) ;
384406 </ script >
385407
386408 < footer >
0 commit comments