$("#BookReader").append("<div id='BRcontainer'></div>");
$("#BRcontainer").append("<div id='BRpageview'></div>");
-
- this.initNavbar();
- this.bindNavigationHandlers();
-
+
// Autohide nav after showing for awhile
var self = this;
if (this.uiAutoHide) {
// Enact other parts of initial params
this.updateFromParams(params);
+
+ // We init the nav bar after the params processing so that the nav slider knows where
+ // it should start (doesn't jump after init)
+ this.initNavbar();
+ this.bindNavigationHandlers();
// Start AJAX request for OL data
if (this.getOpenLibraryRecord) {
}
//if (index<0) return;
+ this.updateNavIndex(index);
+
var previousIndices = this.getSpreadIndices(index);
if (previousIndices[0] < this.firstDisplayableIndex() || previousIndices[1] < this.firstDisplayableIndex()) {
BookReader.prototype.flipFwdToIndex = function(index) {
if (this.animating) return;
-
+
if (null != this.leafEdgeTmp) {
alert('error: leafEdgeTmp should be null!');
return;
}
if (index > this.lastDisplayableIndex()) return;
+ this.updateNavIndex(index);
+
this.animating = true;
var nextIndices = this.getSpreadIndices(index);
$('#BRpager').slider({
animate: true,
min: 0,
- max: this.numLeafs - 1
+ max: this.numLeafs - 1,
+ value: this.currentIndex()
})
.bind('slide', function(event, ui){
self.updateNavPageNum(ui.value);
.append('<div id="pagenum"><span class="currentpage"></span></div>');
//.wrap('<div class="ui-handle-helper-parent"></div>').parent(); // XXXmang is this used for hiding the tooltip?
- this.updateNavPageNum(this.currentIndex);
+ this.updateNavPageNum(this.currentIndex());
$("#BRzoombtn").draggable({axis:'y',containment:'parent'});
}