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