Skip to content

Conversation

@bungcip
Copy link
Contributor

@bungcip bungcip commented Aug 26, 2017

Graphics._cancelFullScreen = function() {
if (document.cancelFullScreen) {
document.cancelFullScreen();
if (document.fullscreenElement) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Could you fix this line to below?
if (document.exitFullscreen) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I changed it to:


 if (document.exitFullscreen) { 
        document.exitFullscreen();

based on https://www.sitepoint.com/use-html5-full-screen-api

*/
Graphics._isFullScreen = function() {
return ((document.fullScreenElement && document.fullScreenElement !== null) ||
return ((document.fullscreenElement && document.fullscreenElement !== null) ||
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this method is very confusing.
line 1202 means Graphics._isFullScreen,
but line 1203, 1204 means actually Graphics._isNotFullScreen.

Could you fix it? 🙇

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I simplified it to

 return document.fullscreenElement ||
           document.mozFullScreen || 
           document.webkitFullscreenElement ||
           document.msFullscreenElement;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bungcip
I'm afraid this commit don't work.
Could you fix Graphics._switchFullScreen?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ouch. after testing it with npm run watch and pressing F4 I can confirm this commit don't work. I will change it tonight.

Copy link
Contributor Author

@bungcip bungcip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @krmbn0576, I already updated the code based on your comment.

*/
Graphics._isFullScreen = function() {
return ((document.fullScreenElement && document.fullScreenElement !== null) ||
return ((document.fullscreenElement && document.fullscreenElement !== null) ||
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I simplified it to

 return document.fullscreenElement ||
           document.mozFullScreen || 
           document.webkitFullscreenElement ||
           document.msFullscreenElement;

@bungcip
Copy link
Contributor Author

bungcip commented Aug 29, 2017

new code in _switchFullScreen() has been commited

Copy link
Collaborator

@krmbn0576 krmbn0576 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, LGTM! :-)

noahlange pushed a commit to noahlange/corescript-ts that referenced this pull request Dec 20, 2017
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@krmbn0576 krmbn0576 merged commit 5a3b825 into rpgtkoolmv:master Mar 28, 2018
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

Successfully merging this pull request may close these issues.

2 participants