Skip to content

Commit

Permalink
Merge pull request #1152 from cdrini/refactor/mode-2up-lit
Browse files Browse the repository at this point in the history
Rewrite Mode2Up to use CSS transforms + Lit
  • Loading branch information
cdrini authored Apr 26, 2023
2 parents 4a09a0b + d880d08 commit 0f42d5c
Show file tree
Hide file tree
Showing 32 changed files with 1,576 additions and 2,039 deletions.
5 changes: 4 additions & 1 deletion BookReaderDemo/BookReaderJSAutoplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ function instantiateBookReader(selector, extraOptions) {
selector = selector || '#BookReader';
extraOptions = extraOptions || {};
var options = {
ppi: 100,
data: [
[
{ width: 800, height: 1200,
Expand Down Expand Up @@ -52,5 +53,7 @@ function instantiateBookReader(selector, extraOptions) {
$.extend(options, extraOptions);
var br = new BookReader(options);
br.init();
br.autoToggle(options);
setTimeout(function() {
br.autoToggle(options);
}, 0);
}
1 change: 1 addition & 0 deletions BookReaderDemo/BookReaderJSSimple.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ function instantiateBookReader(selector, extraOptions) {
selector = selector || '#BookReader';
extraOptions = extraOptions || {};
var options = {
ppi: 100,
data: [
[
{ width: 800, height: 1200,
Expand Down
3 changes: 1 addition & 2 deletions BookReaderDemo/IADemoBr.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ BookReader.optionOverrides.imagesBaseURL = '/BookReader/images/';

const initializeBookReader = (brManifest) => {
console.log('initializeBookReader', brManifest);
const br = new BookReader();

const customAutoflipParams = {
autoflip: !!autoflip,
Expand Down Expand Up @@ -85,7 +84,7 @@ const initializeBookReader = (brManifest) => {
const isRestricted = brManifest.data.isRestricted;
window.dispatchEvent(new CustomEvent('contextmenu', { detail: { isRestricted } }));
if (customAutoflipParams.autoflip) {
br.autoToggle(customAutoflipParams);
window.br.autoToggle(customAutoflipParams);
}
};

Expand Down
Loading

0 comments on commit 0f42d5c

Please sign in to comment.