Merge remote-tracking branch 'maxim/meteor-client-whiteboard' into creating-better-templates
This commit is contained in:
commit
314821a243
@ -824,5 +824,12 @@ class @WhiteboardPaperModel
|
||||
console.log "imageWidth: #{imageWidth}"
|
||||
console.log "imageHeight: #{imageHeight}"
|
||||
|
||||
# @addImageToPaper(data, imageWidth, imageHeight) # TODO the dimensions should be modified
|
||||
@addImageToPaper(data, imageWidth, imageHeight)
|
||||
pic = new Image()
|
||||
_this = this
|
||||
pic.onload = ->
|
||||
if this.width <= this.height # natural dimensions
|
||||
# square => boardHeight is the shortest side
|
||||
_this.addImageToPaper(data, boardHeight * this.width / this.height, boardHeight)
|
||||
else
|
||||
_this.addImageToPaper(data, boardWidth, boardWidth * this.height / this.width)
|
||||
pic.src = data
|
||||
|
Loading…
Reference in New Issue
Block a user