mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
Fixed single example, added example links to readme
This commit is contained in:
parent
27e9046cdc
commit
134b73fc14
6 changed files with 20 additions and 12 deletions
|
@ -51,10 +51,16 @@ Render Methods
|
|||
|
||||
Single: `book.renderTo("area");`
|
||||
|
||||
[View example](https://s3.amazonaws.com/epubjs/examples/single.html)
|
||||
|
||||
Continuous: `book.renderTo("area", { method: "continuous", width: "100%", height: "100%" });`
|
||||
|
||||
[View example](https://s3.amazonaws.com/epubjs/examples/continuous.html)
|
||||
|
||||
Paginate: `book.renderTo("area", { method: "paginate", width: "900", height: "600" });`
|
||||
|
||||
[View example](https://s3.amazonaws.com/epubjs/examples/pages.html)
|
||||
|
||||
|
||||
Documentation
|
||||
-------------------------
|
||||
|
|
7
dist/epub.js
vendored
7
dist/epub.js
vendored
|
@ -2589,9 +2589,9 @@ EPUBJS.core.defaults = function(obj) {
|
|||
EPUBJS.core.extend = function(target) {
|
||||
var sources = [].slice.call(arguments, 1);
|
||||
sources.forEach(function (source) {
|
||||
if(!source) return;
|
||||
Object.getOwnPropertyNames(source).forEach(function(propName) {
|
||||
Object.defineProperty(target, propName,
|
||||
Object.getOwnPropertyDescriptor(source, propName));
|
||||
Object.defineProperty(target, propName, Object.getOwnPropertyDescriptor(source, propName));
|
||||
});
|
||||
});
|
||||
return target;
|
||||
|
@ -4895,6 +4895,7 @@ EPUBJS.Infinite.prototype.scrollTo = function(x, y, silent){
|
|||
|
||||
RSVP.EventTarget.mixin(EPUBJS.Infinite.prototype);
|
||||
EPUBJS.Rendition = function(book, options) {
|
||||
|
||||
this.settings = EPUBJS.core.extend(this.settings || {}, {
|
||||
infinite: true,
|
||||
hidden: false,
|
||||
|
@ -5280,7 +5281,7 @@ EPUBJS.Continuous = function(book, options) {
|
|||
EPUBJS.Continuous.prototype = Object.create(EPUBJS.Rendition.prototype);
|
||||
EPUBJS.Continuous.prototype.constructor = EPUBJS.Continuous;
|
||||
|
||||
EPUBJS.Rendition.prototype.attachListeners = function(){
|
||||
EPUBJS.Continuous.prototype.attachListeners = function(){
|
||||
|
||||
// Listen to window for resize event
|
||||
window.addEventListener("resize", this.onResized.bind(this), false);
|
||||
|
|
4
dist/epub.min.js
vendored
4
dist/epub.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -25,7 +25,7 @@ EPUBJS.Continuous = function(book, options) {
|
|||
EPUBJS.Continuous.prototype = Object.create(EPUBJS.Rendition.prototype);
|
||||
EPUBJS.Continuous.prototype.constructor = EPUBJS.Continuous;
|
||||
|
||||
EPUBJS.Rendition.prototype.attachListeners = function(){
|
||||
EPUBJS.Continuous.prototype.attachListeners = function(){
|
||||
|
||||
// Listen to window for resize event
|
||||
window.addEventListener("resize", this.onResized.bind(this), false);
|
||||
|
|
|
@ -357,9 +357,9 @@ EPUBJS.core.defaults = function(obj) {
|
|||
EPUBJS.core.extend = function(target) {
|
||||
var sources = [].slice.call(arguments, 1);
|
||||
sources.forEach(function (source) {
|
||||
if(!source) return;
|
||||
Object.getOwnPropertyNames(source).forEach(function(propName) {
|
||||
Object.defineProperty(target, propName,
|
||||
Object.getOwnPropertyDescriptor(source, propName));
|
||||
Object.defineProperty(target, propName, Object.getOwnPropertyDescriptor(source, propName));
|
||||
});
|
||||
});
|
||||
return target;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
EPUBJS.Rendition = function(book, options) {
|
||||
|
||||
this.settings = EPUBJS.core.extend(this.settings || {}, {
|
||||
infinite: true,
|
||||
hidden: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue