use Math.round(reduce) in image call
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 25 Jun 2012 15:24:20 +0000 (15:24 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 25 Jun 2012 15:24:20 +0000 (15:24 +0000)
plack/lib/Plack/App/BookReader.pm

index 119f6d1..5d64955 100644 (file)
@@ -113,7 +113,7 @@ br.getPageURI = function(index, reduce, rotate) {
     // reduce and rotate are ignored in this simple implementation, but we
     // could e.g. look at reduce and load images from a different directory
     // or pass the information to an image server
-       var url = pages[index][0] + '?reduce='+reduce;
+       var url = pages[index][0] + '?reduce='+Math.round(reduce);
        console.debug('getPageURI', index, reduce, rotate, url);
     return url;
 }