From fad6788638eff3493e35658a550176d25fb67b19 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 4 Feb 2015 15:24:16 +0530 Subject: [PATCH] load pdf at saved page --- static/js/PDFViewer.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/static/js/PDFViewer.js b/static/js/PDFViewer.js index 6590a7cce..1d8f394bc 100644 --- a/static/js/PDFViewer.js +++ b/static/js/PDFViewer.js @@ -59,10 +59,10 @@ Ox.PDFViewer = function(options, self) { .attr({ frameborder: 0, height: self.options.height + 'px', - src: self.options.pdfjsURL + '?file=' + self.options.url, + src: self.options.pdfjsURL + '?file=' + self.options.url + '#page=' + self.options.page, width: self.options.width + 'px' }) - .onMessage(function(event, data) { + .onMessage(function(data, event) { that.triggerEvent(event, data); }) .appendTo(that); @@ -77,7 +77,6 @@ Ox.PDFViewer = function(options, self) { } function updateSize() { - console.log('updateSize', self.options.width, self.options.height); that.css({ height: self.options.height + 'px', width: self.options.width + 'px',