1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-05 15:32:55 +02:00

Add direction to Layout

This commit is contained in:
Fred Chasen 2017-10-17 11:50:18 -07:00
parent 9b6e864ae4
commit a42f758559
6 changed files with 10 additions and 19 deletions

View file

@ -258,16 +258,6 @@ class DefaultViewManager {
this.add(section)
.then(function(view){
// if (this.settings.direction === "rtl") {
// let offset = view.offset();
// let width = view.width();
//
// this.moveTo({
// left: offset.left + width,
// top: offset.top
// });
// }
// Move to correct place within the section, if needed
if(target) {
let offset = view.locationOf(target);
@ -309,10 +299,6 @@ class DefaultViewManager {
this.emit("resize", view.section);
}
// moveTo(offset){
// this.scrollTo(offset.left, offset.top);
// };
moveTo(offset){
var distX = 0,
distY = 0;
@ -501,7 +487,6 @@ class DefaultViewManager {
if (this.settings.direction === "rtl") {
this.scrollTo(0, 0, true);
} else {
console.log(this.container.scrollWidth);
this.scrollTo(this.container.scrollWidth - this.layout.delta, 0, true);
}
}