projects
/
bookreader.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7191107
)
Preserve left/right position when zoomed in and jumping to index.
author
Michael Ang
<mang@archive.org>
Thu, 20 May 2010 21:42:22 +0000
(21:42 +0000)
committer
Michael Ang
<mang@archive.org>
Thu, 20 May 2010 21:42:22 +0000
(21:42 +0000)
BookReader/BookReader.js
patch
|
blob
|
history
diff --git
a/BookReader/BookReader.js
b/BookReader/BookReader.js
index
bd12273
..
fbaa8b9
100644
(file)
--- a/
BookReader/BookReader.js
+++ b/
BookReader/BookReader.js
@@
-1235,6
+1235,9
@@
BookReader.prototype.jumpToIndex = function(index, pageX, pageY) {
var offset = parseInt( (pageX) / this.reduce);
offset -= $('#BRcontainer').attr('clientWidth') >> 1;
leafLeft += offset;
+ } else {
+ // Preserve left position
+ leafLeft = $('#BRcontainer').scrollLeft();
}
//$('#BRcontainer').attr('scrollTop', leafTop);