Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
59f0490
initial support for EPUB3 Multiple Renditions. Media Queries auto-rel…
danielweck Feb 8, 2015
4de5699
EPUB3 Multiple Renditions: now app client side receives info payload …
danielweck Feb 9, 2015
db456dd
EPUB3 Multiple Renditions mapping (no cross-navigation yet, just raw …
danielweck Feb 10, 2015
adf8547
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck Feb 12, 2015
9e96b82
save/restore/adjust protocol to handle rendition switch
danielweck Feb 13, 2015
1e5cf23
CFI save/restore/adjust for EPUB3 multiple renditions: now compares o…
danielweck Feb 13, 2015
255bc3e
moving code into shared-js
danielweck Feb 16, 2015
5e9a816
submodule
danielweck Feb 16, 2015
db70f8a
various refactorings required to get Multiple Renditions to work corr…
danielweck Feb 16, 2015
0c7daf9
fixes to EPUB3 Multiple Renditions (now working fine, in both zipped …
danielweck Feb 16, 2015
81ba44c
default (first) rendition for first-time load or no-preferences app
danielweck Feb 19, 2015
4492e10
missing RequireJS dep
danielweck Feb 21, 2015
e5ec84e
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck Mar 10, 2015
f8b4a34
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck Mar 23, 2015
3e8a58a
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck Jul 7, 2015
c0d44cd
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck Jul 12, 2015
1a2e01c
fixed Multiple Renditions post-merge (AMD-RequireJS refactoring)
danielweck Jul 12, 2015
09a8019
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck Sep 11, 2015
ec08f43
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck Sep 28, 2015
43c583d
merge fix
danielweck Sep 28, 2015
2f22847
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck Nov 19, 2015
41bdf9f
4x spaces indentation instead of tab character
danielweck Nov 19, 2015
650807a
minor: adjusting code diff to make it more readable in the PR (relati…
danielweck Nov 19, 2015
f1aa31d
minor: removed unnecessary code diff
danielweck Nov 19, 2015
fbb8979
minor: removed unnecessary code change
danielweck Nov 19, 2015
f859414
minor code change to minimize diff in PR
danielweck Nov 19, 2015
0c930b1
minor code diff improvement
danielweck Nov 19, 2015
880a2dc
minor code shift to cleanup PR diff
danielweck Nov 19, 2015
d04ce1b
fixed merge bugs
danielweck Nov 19, 2015
ffdae7a
minor: code re-org to improve diff readability
danielweck Nov 19, 2015
1c8600d
minor code cleanup
danielweck Nov 19, 2015
e7b4f9d
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck Dec 8, 2015
1d76e7e
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck Jan 15, 2016
ebaa0bd
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck Feb 11, 2016
cfc603f
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck Mar 8, 2016
362320c
submod
danielweck Mar 8, 2016
aa5b986
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck Apr 26, 2016
375ba76
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck Aug 16, 2016
3d33084
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck Jan 15, 2017
2b4e4cd
submodule
danielweck Jan 15, 2017
c75d05f
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck May 25, 2017
e1969db
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck Jun 8, 2017
dd1f0e3
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck Jun 19, 2017
0fbd9de
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck Apr 5, 2018
90c2cf4
fixed parser
danielweck Apr 5, 2018
40d31c8
Merge branch 'develop' into feature/epub3MultipleRenditions
danielweck Aug 2, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions js/Readium.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ define(['readium_shared_js/globals', 'text!version.json', 'jquery', 'underscore'
this.reader = new ReaderView(readerOptions);
ReadiumSDK.reader = this.reader;

var openPackageDocument_ = function(ebookURL, callback, openPageRequest, contentType) {
var openPackageDocument_ = function(ebookURL, callback, openPageRequest, contentType, renditionSelection) {

if (_currentPublicationFetcher) {
_currentPublicationFetcher.flushCache();
}
Expand All @@ -106,9 +107,9 @@ define(['readium_shared_js/globals', 'text!version.json', 'jquery', 'underscore'
cacheSizeEvictThreshold = readiumOptions.cacheSizeEvictThreshold;
}

_currentPublicationFetcher = new PublicationFetcher(ebookURL, jsLibRoot, window, cacheSizeEvictThreshold, _contentDocumentTextPreprocessor, contentType);
_currentPublicationFetcher = new PublicationFetcher(ebookURL, jsLibRoot, window, cacheSizeEvictThreshold, _contentDocumentTextPreprocessor, contentType, renditionSelection);

_currentPublicationFetcher.initialize(function(resourceFetcher) {
_currentPublicationFetcher.initialize(function(resourceFetcher, multipleRenditions) {

if (!resourceFetcher) {

Expand All @@ -128,6 +129,7 @@ define(['readium_shared_js/globals', 'text!version.json', 'jquery', 'underscore'

var openBookOptions = readiumOptions.openBookOptions || {};
var openBookData = $.extend(packageDocument.getSharedJsPackageData(), openBookOptions);
openBookData = $.extend(openBookData, {multipleRenditions: multipleRenditions});

if (openPageRequest) {
// resolve package CFI (targeting a spine item ref) to an idref value if provided
Expand All @@ -148,7 +150,7 @@ define(['readium_shared_js/globals', 'text!version.json', 'jquery', 'underscore'
};


this.openPackageDocument = function(ebookURL, callback, openPageRequest) {
this.openPackageDocument = function(ebookURL, callback, openPageRequest, renditionSelection) {

if (!(ebookURL instanceof Blob)
&& !(ebookURL instanceof File)
Expand Down Expand Up @@ -223,7 +225,7 @@ define(['readium_shared_js/globals', 'text!version.json', 'jquery', 'underscore'
}
}

openPackageDocument_(ebookURL, callback, openPageRequest, contentType);
openPackageDocument_(ebookURL, callback, openPageRequest, contentType, renditionSelection);
};
xhr.open('HEAD', ebookURL, true);
//xhr.responseType = 'blob';
Expand All @@ -233,7 +235,7 @@ define(['readium_shared_js/globals', 'text!version.json', 'jquery', 'underscore'
}
}

openPackageDocument_(ebookURL, callback, openPageRequest);
openPackageDocument_(ebookURL, callback, openPageRequest, undefined, renditionSelection);
};

this.closePackageDocument = function() {
Expand Down
Loading