From 8c64ccb50f493e4f4f3c75c690e1ce3809122a60 Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 5 Feb 2015 07:41:06 +0000 Subject: [PATCH] getSpan: lowest page is 1; typo --- static/js/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/utils.js b/static/js/utils.js index 689c401d..6ef13be6 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -1605,14 +1605,14 @@ pandora.getSpan = function(state, val, callback) { extension = result.data.extension, values; if (Ox.contains(['epub', 'pdf', 'txt'], extension)) { - state.span = Ox.limit(parseInt(val), 0, dimensions); + state.span = Ox.limit(parseInt(val), 1, dimensions); } else if (Ox.contains(['gif', 'jpg', 'png'], extension)) { values = val.split(','); if (values.length == 4) { state.span = values.map(function(number, index) { return Ox.limit(number, 0, dimensions[index % 2]); }); - spate.span = [ + state.span = [ Math.min(state.span[0], state.span[2]), Math.min(state.span[1], state.span[3]), Math.max(state.span[0], state.span[2]),