1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-04 15:09:16 +02:00

Tidy up Locations

This commit is contained in:
Fred Chasen 2017-07-20 15:57:58 -04:00
parent ef2a0771c6
commit 6b16ebe9d0
3 changed files with 21 additions and 52 deletions

View file

@ -539,43 +539,6 @@ class DefaultViewManager {
});
return sections;
/*
if(visible.length === 1) {
startA = container.left - visible[0].position().left;
endA = startA + this.layout.spreadWidth + this.layout.gap;
pageLeft = this.mapping.page(visible[0].contents, visible[0].section.cfiBase, startA, endA)
return {
index : visible[0].section.index,
href : visible[0].section.href,
start: pageLeft.start,
end: pageLeft.end
};
}
if(visible.length > 1) {
last = visible.length - 1;
// Left Col
startA = container.left - visible[0].position().left;
endA = startA + this.layout.columnWidth + this.layout.gap / 2;
// Right Col
startB = container.left + this.layout.spreadWidth - visible[last].position().left;
endB = startB + this.layout.columnWidth + this.layout.gap / 2;
pageLeft = this.mapping.page(visible[0].contents, visible[0].section.cfiBase, startA, endA);
pageRight = this.mapping.page(visible[last].contents, visible[last].section.cfiBase, startB, endB);
return {
index : visible[last].section.index,
href : visible[last].section.href,
start: pageLeft.start,
end: pageRight.end
};
}
*/
}
isVisible(view, offsetPrev, offsetNext, _container){