Added the ability to exit the full screen mode by clicking a button.
This commit is contained in:
parent
b5e0f6b856
commit
4b9c76dcd9
@ -223,12 +223,16 @@ Handlebars.registerHelper 'whiteboardSize', (section) ->
|
||||
$('#chat').addClass('invisible')
|
||||
$('#users').addClass('invisible')
|
||||
$('#navbar').addClass('invisible')
|
||||
$('.fullscreenButton').removeClass('whiteboardFullscreenButton')
|
||||
$('.fullscreenButton').addClass('exitFullscreenButton')
|
||||
$('#whiteboard').bind 'webkitfullscreenchange', (e) ->
|
||||
if document.webkitFullscreenElement is null
|
||||
$('#whiteboard').unbind('webkitfullscreenchange')
|
||||
$('#chat').removeClass('invisible')
|
||||
$('#users').removeClass('invisible')
|
||||
$('#navbar').removeClass('invisible')
|
||||
$('.fullscreenButton').removeClass('exitFullscreenButton')
|
||||
$('.fullscreenButton').addClass('whiteboardFullscreenButton')
|
||||
redrawWhiteboard()
|
||||
$(document).bind 'mozfullscreenchange', (e) -> # target is always the document in Firefox
|
||||
if document.mozFullScreenElement is null
|
||||
@ -236,6 +240,8 @@ Handlebars.registerHelper 'whiteboardSize', (section) ->
|
||||
$('#chat').removeClass('invisible')
|
||||
$('#users').removeClass('invisible')
|
||||
$('#navbar').removeClass('invisible')
|
||||
$('.fullscreenButton').removeClass('exitFullscreenButton')
|
||||
$('.fullscreenButton').addClass('whiteboardFullscreenButton')
|
||||
redrawWhiteboard()
|
||||
|
||||
@closePushMenus = ->
|
||||
|
@ -188,3 +188,25 @@
|
||||
width: 10%;
|
||||
}
|
||||
}
|
||||
|
||||
.exitFullscreenButton {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
margin-bottom: 0;
|
||||
padding: 0;
|
||||
&, &:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
i {
|
||||
color: black;
|
||||
}
|
||||
@media @desktop-portrait, @landscape {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
@media @mobile-portrait-with-keyboard, @mobile-portrait {
|
||||
height: 100px;
|
||||
width: 5%;
|
||||
}
|
||||
}
|
||||
|
@ -21,14 +21,22 @@ Template.whiteboard.helpers
|
||||
return ''
|
||||
|
||||
Template.whiteboard.events
|
||||
"click .previousSlide":(event) ->
|
||||
'click .previousSlide':(event) ->
|
||||
BBB.goToPreviousPage()
|
||||
|
||||
"click .nextSlide":(event) ->
|
||||
'click .nextSlide':(event) ->
|
||||
BBB.goToNextPage()
|
||||
|
||||
'click .switchSlideButton': (event) ->
|
||||
$('.tooltip').hide()
|
||||
|
||||
"click .whiteboardFullscreenButton": (event, template) ->
|
||||
'click .whiteboardFullscreenButton': (event, template) ->
|
||||
enterWhiteboardFullscreen()
|
||||
|
||||
'click .exitFullscreenButton': (event, template) ->
|
||||
if document.exitFullscreen
|
||||
document.exitFullscreen()
|
||||
else if document.mozCancelFullScreen
|
||||
document.mozCancelFullScreen()
|
||||
else if document.webkitExitFullscreen
|
||||
document.webkitExitFullscreen()
|
||||
|
@ -7,7 +7,7 @@
|
||||
<div id="whiteboard-paper">
|
||||
</div>
|
||||
{{#if isMobile}}
|
||||
{{> makeButton btn_class="whiteboardFullscreenButton" i_class="ion-arrow-expand"}}
|
||||
{{> makeButton btn_class="fullscreenButton whiteboardFullscreenButton" i_class="ion-arrow-expand"}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if isCurrentUserPresenter}}
|
||||
|
Loading…
Reference in New Issue
Block a user