64 Commits
Author SHA1 Message Date
John Factotum 59971fe343 Fix underline in vertical writing mode
Or rather, add the option to fix it. The actual fix is in the reader.
2023-03-14 11:20:21 +08:00
John Factotum f9ce32b913 Let reader handle storing annotations
The view will only:

1. Send a signal to the reader when overlays are created
2. Allow the reader to add or remove annotations for active overlays
   only; if the annotations won't be on an overlay, it does nothing
3. It returns the index and label, which helps the reader stores
   the annotations.
2023-03-13 22:52:10 +08:00
John Factotum 17ba85b0e5 Typo 2023-03-11 22:04:42 +08:00
John Factotum 25909f41a1 Make locations 10x bigger
Supposedly Kindle uses 150 bytes. Source:

https://www.mobileread.com/forums/showpost.php?s=6fbd6367bde3031320a271b6e3208445&p=1858934&postcount=3

However, since the way locations are calculated here is not exact
anyway, it seems more useful to use a smaller number that's more in line
with (1) the size of an actual page and (2) Foliate's old location size.
2023-03-09 09:14:46 +00: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 2c1919c099 Account for scale when getting rect in frame
Fixes positions for the fix layout renderer
2023-03-08 13:17:03 +00:00
John Factotum b6acb4ff5c FXL: fix onLoad callback
Also add deselect method.
2023-03-08 11:40:18 +00:00
John Factotum 1fef33731f Add methods for clearing selections 2023-03-08 11:02:17 +00:00
John Factotum ac4e3962df Add method for getting TOC item for any location 2023-03-07 06:46:28 +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
John Factotum 6977ac005d Get rect in reader instead of view
Also expose index in `loaded` event
2022-10-25 05:55:57 +00:00
John Factotum d63905346c Add annotations
Simplify overlayer API; allow one overlayer only.
2022-10-24 13:11:51 +00:00
John Factotum 5103dc9b90 View: make it possible to do things on load
Also refactor reader, and add left/right shortcuts
2022-10-22 12:42:35 +00:00
John Factotum d0cd085a22 Add sample reader 2022-10-19 11:04:43 +00:00