mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-02 14:49:16 +02:00
Update core.prefix
This commit is contained in:
parent
8cd4108c52
commit
176125e46b
5 changed files with 8 additions and 6 deletions
|
@ -18,7 +18,7 @@
|
|||
<a id="next" href="#next" class="arrow">›</a>
|
||||
|
||||
<script>
|
||||
var params = new URLSearchParams(document.location.search.substring(1));
|
||||
var params = URLSearchParams && new URLSearchParams(document.location.search.substring(1));
|
||||
var url = params && params.get("url") && decodeURIComponent(params.get("url"));
|
||||
var currentSectionIndex = (params && params.get("loc")) ? params.get("loc") : 0;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "epubjs",
|
||||
"version": "0.3.32",
|
||||
"version": "0.3.33",
|
||||
"description": "Parse and Render Epubs",
|
||||
"main": "lib/index.js",
|
||||
"module": "src/index.js",
|
||||
|
|
|
@ -2,6 +2,7 @@ import Book from "./book";
|
|||
import EpubCFI from "./epubcfi";
|
||||
import Rendition from "./rendition";
|
||||
import Contents from "./contents";
|
||||
import * as core from "./utils/core";
|
||||
|
||||
/**
|
||||
* Creates a new Book
|
||||
|
@ -23,6 +24,7 @@ if (typeof(global) !== "undefined") {
|
|||
ePub.CFI = EpubCFI;
|
||||
ePub.Rendition = Rendition;
|
||||
ePub.Contents = Contents;
|
||||
ePub.utils = core;
|
||||
|
||||
ePub.ViewManagers = {};
|
||||
ePub.Views = {};
|
||||
|
|
|
@ -276,7 +276,7 @@ class ContinuousViewManager extends DefaultViewManager {
|
|||
var offset = horizontal ? this.scrollLeft : this.scrollTop;
|
||||
var visibleLength = horizontal ? bounds.width : bounds.height;
|
||||
var contentLength = horizontal ? this.container.scrollWidth : this.container.scrollHeight;
|
||||
console.log(bounds);
|
||||
|
||||
if (offset + visibleLength + delta >= contentLength) {
|
||||
last = this.views.last();
|
||||
next = last && last.section.next();
|
||||
|
|
|
@ -38,8 +38,8 @@ export function isFloat(n) {
|
|||
}
|
||||
|
||||
export function prefixed(unprefixed) {
|
||||
//var vendors = ["Webkit", "Moz", "O", "ms" ];
|
||||
var vendors = ["-Webkit-", "-moz-", "-o-", "-ms-"];
|
||||
var vendors = ["Webkit", "webkit", "Moz", "O", "ms" ];
|
||||
var prefixes = ["-webkit-", "-webkit-", "-moz-", "-o-", "-ms-"];
|
||||
var upper = unprefixed[0].toUpperCase() + unprefixed.slice(1);
|
||||
var length = vendors.length;
|
||||
|
||||
|
@ -49,7 +49,7 @@ export function prefixed(unprefixed) {
|
|||
|
||||
for ( var i=0; i < length; i++ ) {
|
||||
if (typeof(document.body.style[vendors[i] + upper]) != "undefined") {
|
||||
return vendors[i] + upper;
|
||||
return prefixes[i] + unprefixed;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue