-
Notifications
You must be signed in to change notification settings - Fork 6
Fullscreen plugin #80
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
Conversation
src/plugins/FullScreenPlugin.js
Outdated
|
|
||
|
|
||
| document.addEventListener('fullscreenchange', () => { | ||
| this.sendProperty('fullScreen', this.isFullScreen); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason this one is different from the rest? this.isFullScreen returns an html element object, so the client just receives and object. You could just throw in the this.sendAllProperties() call instead.
src/plugins/FullScreenPlugin.js
Outdated
| toggleFullScreen() { | ||
| if (!document.fullscreenElement) { | ||
| this.iFrame.requestFullscreen().then(() => { | ||
| this.sendProperty(FullScreenPlugin.fullscreenKey, document.fullscreenElement != null ? 'true' : 'false'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also use the this.sendAllProperties() here, just to avoid the duplication.
…tainer into SpringRoll-develop
Merging changes from dev
src/plugins/FullScreenPlugin.js
Outdated
|
|
||
|
|
||
| document.addEventListener('fullscreenchange', () => { | ||
| this.sendAllProperties(FullScreenPlugin.fullscreenKey, this.isFullScreen); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sendAllProperties doesn't actually need any input its implemented down on line 75, it just sends the currently active property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the sendAllProperties call doesn't actually use the isFullScreen get so it might be worth updating that just to keep everything consistent.
No description provided.