var res = this.getLink('interface-previous', '#', 'previous', '', '', false);
res += this.getLink('interface-next', '#', 'next', '', '', false);
$('#interface').append(res);
- $(document).on('click touchend', '#next', goNextPage);
- $(document).on('click touchend', '#previous', goPreviousPage);
+ $(document).on('touchstart click', '#next', goNextPage);
+ $(document).on('touchstart click', '#previous', goPreviousPage);
}
};
\ No newline at end of file
if (this.orientation == 'landscape') {
fww *= 2;
}
- // console.log('aw : ' + aw);
- // console.log('fww : ' + fww);
- // console.log('ah : ' + ah);
- // console.log('fhh : ' + fhh);
- // console.log('interfaceScale : ' + interfaceScale);
- // console.log('extraX : ' + extraX);
- // console.log('margintop : ' + this.margintop);
- // console.log('marginbottom : ' + this.marginbottom);
- // console.log('marginleft : ' + this.marginleft);
- // console.log('marginright : ' + this.marginright);
- console.log('marginLeft : ' + marginLeft);
- console.log('marginTop : ' + marginTop);
- console.log('marginBottom : ' + marginBottom);
- console.log('marginRight : ' + marginRight);
-
this.bookScale = Math.min(aw / fww, ah / fhh);
- console.log('bookScale : ' + this.bookScale);
+
var fw = this.bookScale * fww;
var fh = this.bookScale * fhh;
$("#fluidbook").transform({
},
dragzoom: function (e) {
- console.log(e.dx + ' :: ' + e.dy);
if (e.dx == 0 && e.dy == 0) {
return;
}
if (fluidbook.help.isVisible()) {
return;
}
- try {
+
+ if (e.originalEvent.touches != undefined && e.originalEvent.touches.length > 0) {
+ var o = $("#next").offset();
y = e.originalEvent.touches[0].pageY - o.top;
- } catch (err) {
+ } else {
y = e.offsetY == undefined ? e.originalEvent.layerY : e.offsetY;
}
+
if (y < 65) {
if (fluidbook.pad.enabled) {
fluidbook.goNextChapter();
return;
}
var y;
- try {
+
+ if (e.originalEvent.touches != undefined && e.originalEvent.touches.length > 0) {
+ var o = $("#previous").offset();
y = e.originalEvent.touches[0].pageY - o.top;
- } catch (err) {
+ } else {
y = e.offsetY == undefined ? e.originalEvent.layerY : e.offsetY;
}
if (y < 65) {