2014-12-16 05:08:09 +08:00
|
|
|
@redrawWhiteboard = () ->
|
2015-01-07 01:42:37 +08:00
|
|
|
if window.matchMedia('(orientation: portrait)').matches
|
|
|
|
$('#whiteboard').height($('#whiteboard').width() * getInSession('slideOriginalHeight') / getInSession('slideOriginalWidth') + $('#whiteboard-navbar').height() + 10)
|
|
|
|
else if $('#whiteboard').height() isnt $('#users').height() + 10
|
|
|
|
$('#whiteboard').height($('#users').height() + 10)
|
|
|
|
adjustedDimensions = scaleSlide(getInSession('slideOriginalWidth'), getInSession('slideOriginalHeight'))
|
|
|
|
wpm = whiteboardPaperModel
|
|
|
|
wpm.clearShapes()
|
|
|
|
wpm.clearCursor()
|
|
|
|
manuallyDisplayShapes()
|
|
|
|
wpm.scale(adjustedDimensions.width, adjustedDimensions.height)
|
|
|
|
wpm.createCursor()
|
2015-01-22 04:02:50 +08:00
|
|
|
|
|
|
|
# Shrink height of the slide by 10 pixels. 5 pixels for the above margins, 5 pixels for bottom padding for a total of 10 removed pixels
|
|
|
|
$("#whiteboard-paper").height(($("#whiteboard-paper").height()-10) + 'px')
|
2015-01-22 04:30:57 +08:00
|
|
|
|
|
|
|
Template.whiteboard.rendered = ->
|
|
|
|
$("#whiteboard").height(($("#chat").height()) + 'px')
|