Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Esc" and Play/Stop Slideshow put the FullScreen at a mess #354

Open
vletroye opened this issue Nov 1, 2017 · 4 comments
Open

"Esc" and Play/Stop Slideshow put the FullScreen at a mess #354

vletroye opened this issue Nov 1, 2017 · 4 comments

Comments

@vletroye
Copy link

vletroye commented Nov 1, 2017

Once one enters the fullscreen mode to play a slideshow, playing with Esc/Stop/Play/etc... will result in a mess, with the image_panel maximized although it should not.

Here the changes I did in src\js\slideshow.js to fix this:


function toggleFullScreen() {
  var doc = window.document;
  var docEl = doc.getElementById("image_panel");

  var requestFullScreen = docEl.requestFullscreen || docEl.mozRequestFullScreen || docEl.webkitRequestFullScreen || docEl.msRequestFullscreen;
  var cancelFullScreen = doc.exitFullscreen || doc.mozCancelFullScreen || doc.webkitExitFullscreen || doc.msExitFullscreen;

  if(!isFullScreen()) {  //<<=========================== Changed
    requestFullScreen.call(docEl);
  }
  else {
    cancelFullScreen.call(doc);
  }
}

function isFullScreen() { //<<=========================== New Method
  var doc = window.document;
  return (doc.fullscreenElement || doc.mozFullScreenElement || doc.webkitFullscreenElement || doc.msFullscreenElement);
}

function start_slideshow(){	
	slideshow_status = 1; 
	timer = setInterval('run_slideshow()',3000);
	$(".image_panel").css("position","fixed");
	$(".image_panel").css("z-index",5000);
	$(".image_panel").animate({bottom:'0'},200);
	hide_links();

	if(!isFullScreen()) {  //<<=========================== Add an if
	  toggleFullScreen();
	}
}

function play_slideshow(){
	slideshow_status = 1;  //<<======================== Changed
	timer = setInterval('run_slideshow()',3000);  //<<=========== Changed
	$("#pause").show();
	$("#play").hide();
}


function stop_slideshow(){
	slideshow_status = 0;
	clearInterval(timer);
	$(".image_panel").animate({bottom:'150'},200);
	$(".image_panel").css("position","absolute");
	$(".image_panel").css("z-index",50);
	show_links();
	
	if(isFullScreen()) {  //<<=========================== Add an if
	  toggleFullScreen();
	}	
}
@andiges
Copy link

andiges commented Nov 2, 2017

@vletroye maybe it will be better, if you create a patch and do a pull request? I think it will be easier to understand what you did and it can be faster merged into master. This also affects other issues: #353 #352 #351 created by you.

@thibaud-rohmer
Copy link
Owner

thibaud-rohmer commented Nov 2, 2017 via email

@vletroye
Copy link
Author

vletroye commented Nov 2, 2017

You are 100% right ! But I am still trying to figure out how to work with github from command line... I was much more confortable with CodePlex (TFS) I have to say (And only able to use it from Visual Studio)

I have now installed Git on my Synology, but I am still reading Git documentation and... it's actually far from clear for me I have to say. I was only able to clone a branch using git clone https://.....//.git --branch xxx... :(

Do you have a clear and straightforward how-to for dummies ? Ex.: Git Clone xxx, Git Pull xxx, Change your code, Gut Push xxx ? (I will continue to google on that in the mean time ;)

@vletroye
Copy link
Author

vletroye commented Nov 2, 2017

Ok, as I am lost with Git commands, I did a fork and opened it with Visual Studio... I was finally ably to create a Pull Request: #355

I hope it's ok?!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants