John Factotum
2e5dda77e0
Unload section when destroying the renderer
2023-06-01 01:44:00 +08:00
John Factotum
14067fe683
Add workaround for Firefox's broken resize observer
2023-05-31 20:09:31 +08:00
John Factotum
d5d1541d3b
Paginator: use CSS grid
...
Massively simplify margin/padding and header/footer layout and eliminate
unnecessary resizes and resize loops.
Also remove layout and style API from View, as these are only applicable
to the paginator.
2023-05-28 22:17:56 +08:00
John Factotum
21744e3c85
Fix touch swiping for vertical writing
2023-05-28 21:22:14 +08:00
John Factotum
0be94135fa
Fix positioning of the overlayer
2023-05-27 19:18:31 +08:00
John Factotum
abcd87ed9a
Fix RTL
2023-05-27 02:20:07 +08:00
John Factotum
90a1706e82
Make scrollBy and snap accept both axes
...
So that event handlers don't need to know the axis
2023-05-27 01:45:49 +08:00
John Factotum
81c595fcc3
Animate scroll manually instead of using scroll-behavior smooth
2023-05-27 00:26:46 +08:00
John Factotum
4c481214cb
Fix page flip throttling
2023-05-27 00:06:27 +08:00
John Factotum
36a8fb62e7
Fix history state not updated when swiping
2023-05-27 00:04:26 +08:00
John Factotum
772cbe00ca
Add touchscreen swipe gesture
2023-05-23 01:26:01 +08:00
John Factotum
fb95b70c8e
Fix page getting stuck in Foliate GTK
2023-05-18 23:41:26 +08:00
John Factotum
7e618eb2b1
Fix initial prev/next
2023-05-18 23:03:51 +08:00
John Factotum
ba4f58af4f
Refactor and fix prev/next at start/end of book
2023-05-17 23:27:38 +08:00
John Factotum
887138472b
Fix visible range
2023-05-17 12:49:23 +08:00
John Factotum
31f9d4f919
Fix header/footer layout
2023-05-17 04:04:09 +08:00
John Factotum
ec512a8b7e
Add sliding animation
...
Can be disabled by setting `.pageAnimation` to `false`.
2023-05-17 02:52:39 +08:00
John Factotum
57ab79d598
Replace deselect with more general content access method
2023-05-16 19:12:26 +08:00
John Factotum
3c4d309b52
Fix unnecessary scrollbar in scrolled mode
2023-05-16 15:50:20 +08:00
John Factotum
257538169d
Fix header/footer z-index
2023-05-15 12:15:39 +00:00
John Factotum
0a3f4b8f27
Use Shadow DOM
2023-05-15 20:00:35 +08:00
John Factotum
4acfc050ea
Turn View into a custom element, and use DOM events
...
Also change "relocated" -> "relocate"
2023-05-15 15:27:18 +08:00
John Factotum
a0acc506c5
Fix footer/header layout
...
Fix regression from 2bcff70450
2023-05-14 23:24:44 +08:00
John Factotum
17fb71943f
Scrolled mode: leave space for top margin when scrolling to position
2023-05-14 22:11:46 +08:00
John Factotum
a41e4b897c
Fix header/footer direction
2023-05-14 13:43:31 +08:00
John Factotum
2bcff70450
Improve layout for vertical writing
...
- Make horizontal padding grow with `gap`
- Make `maxColumnWidth` limit inline width, not horizontal width
2023-05-14 13:02:18 +08:00
John Factotum
20254e30aa
Scroll to anchor when body size changes
...
Also: remove unused private method
2023-05-13 13:22:48 +08:00
John Factotum
5da3be5200
Add destroy method
...
Which revokes all blob URLs and removes the element from document.
2023-05-09 14:02:07 +08:00
John Factotum
41c00942d2
Further reduce header and footer styles
...
Instead, provide classes.
Also: prefix all classes with `foliate-`.
2023-05-03 17:31:22 +08:00
John Factotum
902cd9ad46
Really fix ResizeObserver loop
2023-05-02 19:08:58 +08:00
John Factotum
604a8caf3b
Fix ResizeObserver loop in some situations
...
This is caused by 7486360390 .
Not sure why it happens, and it only occurs in WebKit. Truncating the
padding seems to be the fix.
2023-05-02 01:35:43 +08:00
John Factotum
7486360390
Make margin relative to page width
2023-05-01 23:04:53 +08:00
John Factotum
df9822201f
Fix misaligned columns in some situations
2023-04-08 21:23:45 +08:00
John Factotum
06417f763e
Fix misaligned columns at certain fractional widths
...
Fixes #2
2023-04-02 17:13:29 +08:00
John Factotum
c173f5b523
Paginator: allow injecting CSS *before* the book's stylesheet
...
Before this commit: `setStyle()` takes a single string argument, which
is the stylesheet it will append to head.
After this commit: it optionally accepts two stylesheet strings in an
array, the first of which will be prepended, allowing the reading system
to set default styles that can be overridden by the book.
2023-04-01 23:33:10 +08:00
John Factotum
6f29a12426
Reduce header/footer styling in paginator
...
Leave the alignment, font, and color to the reader
2023-03-28 04:52:03 +08:00
John Factotum
5a0c4801cf
Revert "Set header/footer text color from book stylesheet"
...
This reverts commit db5fc0f679 .
Reverting for now as it's incomplete and more broken than before.
A full implementation of this would require watching for `matchMedia()`
changes and getting the computed style again. It needs to either get the
list of media queries from the stylesheet, or just assume color scheme
related media queries.
2023-03-27 03:00:32 +08:00
John Factotum
ca8846b256
Fix scrolled layout when using * { box-sizing: border-box }
2023-03-27 00:32:41 +08:00
John Factotum
db5fc0f679
Set header/footer text color from book stylesheet
2023-03-27 00:30:46 +08:00
John Factotum
ef5ca72ba6
Fix scrolling to fractions
2023-03-20 15:52:19 +08:00
John Factotum
1511884137
Fix scrolling to range following auto hyphen in different column
2023-03-20 00:33:15 +08:00
John Factotum
99624d013a
Improve invertibility
...
- Don't use multiply
- Set background on separate div
2023-03-10 22:25:17 +08:00
John Factotum
2c452719d0
Paginator: add option for maximum number of columns
...
Also: allow it to be positioned relative to the parent
2023-03-09 23:36:20 +08:00
John Factotum
857a94daf3
Add header and footer
...
Also allow getting next location, which is useful for the footer
2023-03-09 16:20:28 +08:00
John Factotum
1fef33731f
Add methods for clearing selections
2023-03-08 11:02:17 +00:00
John Factotum
dee64c19bb
Fix glyph clipping in WebKit
...
See https://github.com/johnfactotum/foliate/issues/177
2023-02-21 08:08:15 +00:00
John Factotum
07a8b76d3a
Fixes for non-1:1 zoom levels
...
Hopefully fixes #2
2022-12-25 01:49:20 +00:00
John Factotum
2b51522c43
Add .eslintrc.json
...
And fix issues
2022-11-04 14:12:07 +00:00
John Factotum
60bebc39b4
Remove useless variable
2022-10-27 09:30:47 +00:00
John Factotum
967a00f5b8
Make paginator more self-contained
...
Don't rely on absolute positioning and margin. And set background on
the containing element rather than the document body.
2022-10-27 09:05:29 +00:00