mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-08 18:31:43 +00:00
Merge pull request #1 from SFenton/feature/epubjs-cfi-navigation-fix
Fix EPUB.js CFI navigation bug
This commit is contained in:
commit
d41af77658
2 changed files with 40 additions and 1 deletions
|
|
@ -12,7 +12,8 @@
|
||||||
"generate": "nuxt generate",
|
"generate": "nuxt generate",
|
||||||
"test": "npm run compile-tailwind && cypress run --component --browser chrome",
|
"test": "npm run compile-tailwind && cypress run --component --browser chrome",
|
||||||
"test-visually": "npm run compile-tailwind && cypress open --component --browser chrome",
|
"test-visually": "npm run compile-tailwind && cypress open --component --browser chrome",
|
||||||
"compile-tailwind": "npx @tailwindcss/cli -i ./assets/tailwind.css -o ./cypress/support/tailwind.compiled.css"
|
"compile-tailwind": "npx @tailwindcss/cli -i ./assets/tailwind.css -o ./cypress/support/tailwind.compiled.css",
|
||||||
|
"postinstall": "patch-package"
|
||||||
},
|
},
|
||||||
"author": "advplyr",
|
"author": "advplyr",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
|
@ -38,6 +39,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nuxtjs/pwa": "^3.3.5",
|
"@nuxtjs/pwa": "^3.3.5",
|
||||||
"@tailwindcss/cli": "^4.0.14",
|
"@tailwindcss/cli": "^4.0.14",
|
||||||
|
"patch-package": "^8.0.0",
|
||||||
"postcss": "^8.3.6",
|
"postcss": "^8.3.6",
|
||||||
"tailwindcss": "^4.0.13"
|
"tailwindcss": "^4.0.13"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
37
client/patches/epubjs+0.3.93.patch
Normal file
37
client/patches/epubjs+0.3.93.patch
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
diff --git a/node_modules/epubjs/lib/managers/continuous/index.js b/node_modules/epubjs/lib/managers/continuous/index.js
|
||||||
|
index 4912876..a27dec2 100644
|
||||||
|
--- a/node_modules/epubjs/lib/managers/continuous/index.js
|
||||||
|
+++ b/node_modules/epubjs/lib/managers/continuous/index.js
|
||||||
|
@@ -91,14 +91,12 @@ class ContinuousViewManager extends _default2.default {
|
||||||
|
} else {
|
||||||
|
distX = Math.floor(offset.left / this.layout.delta) * this.layout.delta;
|
||||||
|
offsetX = distX + this.settings.offsetDelta;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (distX > 0 || distY > 0) {
|
||||||
|
- this.scrollBy(distX, distY, true);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- afterResized(view) {
|
||||||
|
+ if (distX > 0 || distY > 0) {
|
||||||
|
+ this.scrollTo(distX, distY, true);
|
||||||
|
+ }
|
||||||
|
+ } afterResized(view) {
|
||||||
|
this.emit(_constants.EVENTS.MANAGERS.RESIZE, view.section);
|
||||||
|
} // Remove Previous Listeners if present
|
||||||
|
|
||||||
|
diff --git a/node_modules/epubjs/src/managers/continuous/index.js b/node_modules/epubjs/src/managers/continuous/index.js
|
||||||
|
index d61f8f7..0743938 100644
|
||||||
|
--- a/node_modules/epubjs/src/managers/continuous/index.js
|
||||||
|
+++ b/node_modules/epubjs/src/managers/continuous/index.js
|
||||||
|
@@ -90,7 +90,7 @@ class ContinuousViewManager extends DefaultViewManager {
|
||||||
|
}
|
||||||
|
|
||||||
|
if (distX > 0 || distY > 0) {
|
||||||
|
- this.scrollBy(distX, distY, true);
|
||||||
|
+ this.scrollTo(distX, distY, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue