Просмотр исходного кода

set the size of the pdf container using jquery methods

Brian Gough 12 лет назад
Родитель
Сommit
7071ee3540
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      services/web/public/coffee/ide/pdfng/directives/pdfRenderer.coffee

+ 2 - 2
services/web/public/coffee/ide/pdfng/directives/pdfRenderer.coffee

@@ -141,8 +141,8 @@ define [
 				canvas.height(newHeight + 'px')
 				canvas.height(newHeight + 'px')
 				canvas.width(newWidth + 'px')
 				canvas.width(newWidth + 'px')
 
 
-				element.canvas[0].height = newHeight
-				element.canvas[0].width = newWidth
+				element.canvas.height(newHeight)
+				element.canvas.width(newWidth)
 
 
 				if pixelRatio != 1
 				if pixelRatio != 1
 					ctx.scale(pixelRatio, pixelRatio)
 					ctx.scale(pixelRatio, pixelRatio)