mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-05 15:32:55 +02:00
Added fixed layout scaling, manager queue
This commit is contained in:
parent
7c135b2152
commit
0d8deb5991
14 changed files with 436 additions and 1781 deletions
|
@ -95,6 +95,7 @@ Contents.prototype.textWidth = function() {
|
|||
|
||||
// get the width of the text content
|
||||
width = range.getBoundingClientRect().width;
|
||||
|
||||
return width;
|
||||
|
||||
};
|
||||
|
@ -155,16 +156,16 @@ Contents.prototype.viewport = function() {
|
|||
content = $viewport.getAttribute("content");
|
||||
contents = content.split(',');
|
||||
if(contents[0]){
|
||||
width = contents[0].replace("width=", '');
|
||||
width = contents[0].replace("width=", '').trim();
|
||||
}
|
||||
if(contents[1]){
|
||||
height = contents[1].replace("height=", '');
|
||||
height = contents[1].replace("height=", '').trim();
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
width: width,
|
||||
height: height
|
||||
width: parseInt(width),
|
||||
height: parseInt(height)
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue