2014-08-20 04:22:29 +08:00
|
|
|
Template.whiteboard.rendered = ->
|
2014-08-21 05:17:18 +08:00
|
|
|
$(window).resize( ->
|
2014-09-25 01:26:24 +08:00
|
|
|
currentSlide = getCurrentSlideDoc()
|
2014-10-17 02:13:13 +08:00
|
|
|
|
2014-09-25 01:26:24 +08:00
|
|
|
pic = new Image()
|
2014-10-17 02:13:13 +08:00
|
|
|
pic.onload = ->
|
2014-11-01 06:27:27 +08:00
|
|
|
adjustedDimensions = scaleSlide(this.width, this.height)
|
2014-10-17 00:43:38 +08:00
|
|
|
|
2014-10-17 02:13:13 +08:00
|
|
|
wpm = whiteboardPaperModel
|
2014-11-04 06:26:11 +08:00
|
|
|
wpm.setAdjustedDimensions(adjustedDimensions.width, adjustedDimensions.height)
|
2014-10-17 02:13:13 +08:00
|
|
|
wpm.clearShapes()
|
|
|
|
wpm.clearCursor()
|
2014-10-17 00:43:38 +08:00
|
|
|
manuallyDisplayShapes()
|
|
|
|
|
2014-09-25 01:26:24 +08:00
|
|
|
#wpm._updateContainerDimensions()
|
2014-10-17 00:43:38 +08:00
|
|
|
|
2014-11-01 06:27:27 +08:00
|
|
|
wpm.scale(adjustedDimensions.width, adjustedDimensions.height)
|
2014-10-17 02:13:13 +08:00
|
|
|
wpm.createCursor()
|
2014-10-17 00:43:38 +08:00
|
|
|
|
2014-09-25 01:26:24 +08:00
|
|
|
pic.src = currentSlide?.slide?.png_uri
|
2014-08-21 05:17:18 +08:00
|
|
|
);
|