mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
Fixed locking to solve single page issues
This commit is contained in:
parent
61ebe6d16e
commit
23ca0b840d
8 changed files with 32 additions and 29 deletions
|
@ -17,7 +17,7 @@
|
|||
color: #333;
|
||||
|
||||
position: absolute;
|
||||
height: 96.5%;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
-webkit-align-items: center;
|
||||
|
@ -26,7 +26,7 @@
|
|||
|
||||
#viewer {
|
||||
width: 290px;
|
||||
height: 100%;
|
||||
height: 580px;
|
||||
background: white;
|
||||
box-shadow: 0 0 4px #ccc;
|
||||
padding: 10px 10px 0px 10px;
|
||||
|
@ -70,7 +70,10 @@
|
|||
|
||||
@media only screen
|
||||
and (min-device-width : 320px)
|
||||
and (max-device-width : 667px) {
|
||||
and (max-device-width : 667px) {
|
||||
#viewer {
|
||||
height: 96.5%;
|
||||
}
|
||||
.arrow {
|
||||
position: inherit;
|
||||
display: none;
|
||||
|
@ -84,7 +87,6 @@
|
|||
<div id="prev" class="arrow">‹</div>
|
||||
<div id="next" class="arrow">›</div>
|
||||
<script>
|
||||
var currentSectionIndex = 14;
|
||||
// Load the opf
|
||||
// var book = ePub("https://s3.amazonaws.com/moby-dick/OPS/package.opf");
|
||||
var book = ePub("../books/moby-dick/OPS/package.opf");
|
||||
|
@ -93,9 +95,8 @@
|
|||
width: "100%",
|
||||
height: "100%"
|
||||
});
|
||||
// var pagination = rendition.paginate();
|
||||
|
||||
var displayed = rendition.display(currentSectionIndex);
|
||||
var displayed = rendition.display();
|
||||
|
||||
|
||||
displayed.then(function(renderer){
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
height: 600
|
||||
});
|
||||
|
||||
var displayed = rendition.display("epubcfi(/6/14[xchapter_001]!4/2/30/2[c001p0016]/1:47)");
|
||||
var displayed = rendition.display(4);
|
||||
|
||||
|
||||
displayed.then(function(renderer){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue