esmero / format_strawberryfield

Set of Display formatters, extractors and utils to make Strawberry field data glow
GNU Lesser General Public License v3.0
6 stars 10 forks source link

IA Bookreader: permit configuration of default page mode #417

Closed patdunlavey closed 9 months ago

patdunlavey commented 9 months ago

Not sure if I'm just missing a trick here, but currently IA Bookreader always defaults to the 2-up page display mode. I'd like to be able to configure the default page mode (1up, 2up, thumbs) in the \Drupal\format_strawberryfield\Plugin\Field\FieldFormatter\StrawberryPagedFormatter::settingsForm, and then reflect that setting in the default behavior of the bookreader when it loads a book manifest (absent the #page/NN fragment in the url).

patdunlavey commented 9 months ago

The config part is easy, but I'm struggling with the bookreader behavior part. If you have any pointers @DiegoPino , please let me know!

DiegoPino commented 9 months ago

@patdunlavey thanks, if you are OK I will share a code snippet with you before the end of the day. It is actually simple but requires us to parse that from the manifest the same way we get the canvases before initializing the reader. More later (sorry have a few meetings)

DiegoPino commented 9 months ago

@patdunlavey this issue here: https://github.com/esmero/format_strawberryfield/issues/292

Is a better option than a fixed setting

patdunlavey commented 9 months ago

Ok, sending the page mode hint into IAB via the IIIF manifest makes sense to me. I particularly like the idea that you could have different hints per canvas. I'm thinking we should close this issue as superseded (preceded, actually!).