APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

how to go FullScreen on mobile browser for EJSS?

Return to the EJS Modeling forum
Login to post to this thread

how to go FullScreen on mobile browser for EJSS?
lookang Avatar
lookang
245 Posts

i figure out there are codes for desktop and Android browsers going fullscreen such as


function toggleFullScreen() {
  if ((document.fullScreenElement && document.fullScreenElement !== null) ||    
   (!document.mozFullScreen && !document.webkitIsFullScreen)) {
    if (document.documentElement.requestFullScreen) {  
      document.documentElement.requestFullScreen();  
    } else if (document.documentElement.mozRequestFullScreen) {  
      document.documentElement.mozRequestFullScreen();  
    } else if (document.documentElement.webkitRequestFullScreen) {  
      document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);  
    }  
  } else {  
    if (document.cancelFullScreen) {  
      document.cancelFullScreen();  
    } else if (document.mozCancelFullScreen) {  
      document.mozCancelFullScreen();  
    } else if (document.webkitCancelFullScreen) {  
      document.webkitCancelFullScreen();  
    }  
  }  
}

but it did not work for mobile browser (iPAD iPhone chrome, iPhone Safari seems to go fullscreen on its own), the screen remains the same size.

you can try to download my source here
http://iwant2study.org/lookangejss/01_measurement/ejss_src_SHMmassscale.zip

My request:
can anyone release an EJSS file that can go Fullscreen on  iPAD and iPhone chrome mobile browser?

Post edited July 9, 2015 at 3:02 AM EST.

Post edited July 9, 2015 at 3:07 AM EST.

Post edited July 9, 2015 at 3:22 AM EST.

Post edited July 9, 2015 at 3:31 AM EST.

Attached File: ejss_src_SHMmassscale.zip


OSP@SG blog
OSP@SG Digital Library

Current Replies - View all
Re: how to go FullScreen ...   (lookang - )
OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book