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? post and replies

Return to the how to go FullScreen on mobile browser for EJSS? thread
Login to post to this thread

how to go FullScreen on mobile browser for EJSS?
lookang Avatar
lookang
222 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

Replies to how to go FullScreen on mobile browser for EJSS?

Re: how to go FullScreen on mobile browser for EJSS? -
lookang Avatar
lookang
222 Posts

it appears that i have managed to figure out and create a 2 statebutton for fullscreen, which works beautifully for Android, i speculate is especially useful for handphone size.

do post your comments here :)

thank you Prof. Francisco Esquembre and Wolfgang Christian!

i also thank Prof Fu-Kwun Hwang for teaching me EJS on his forum!

to test it http://iwant2study.org/lookangejss/01_measurement/ejss_model_AAPTVernierCaliper/AAPTVernierCaliper_Simulation.xhtml

download and unzip

http://iwant2study.org/lookangejss/01_measurement/ejss_model_AAPTVernierCaliper.zip 

source code

http://iwant2study.org/lookangejss/01_measurement/ejss_src_AAPTVernierCaliper.zip

 

http://weelookang.blogspot.sg/2015/07/ground-breaking-news-i-have-developed.html
launch in Note3 5.5 inch screen
run: Link1 , Link2
download and unzip: Link1 , Link2
source: Link1Link2
author: Fu-Kwun Hwang, lookang
Author of EJSS authoring tool: Francisco Esquembre
 
http://weelookang.blogspot.sg/2015/07/ground-breaking-news-i-have-developed.html
launch in Note3 5.5 inch screen after clicking the FULLSCREEN buttonrun: Link1 , Link2
download and unzip: Link1 , Link2
source: Link1Link2
author: Fu-Kwun Hwang, lookang
Author of EJSS authoring tool: Francisco Esquembre

OSP@SG blog
OSP@SG Digital Library


OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book