-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISSUE-59: Allow 100% with for all formatters and some ++candy #60
Conversation
For some strange reason, this schema keys wen't this weird route. This is the first step on fixing these. Introduced in #19
Figure out what the form is really saving right?
This touches every formatter. Should not require any changes on current settings.
reacting to my lack of sleep
Will add an onresize callback after this commit. Fix to 720 px as starting point if you have 0 as width. JS will then do a full rescale to scale to pixels based on the parent container
Next step, the base64 encoded snapshot of the 3D rendering to allow a Thumbnail.
Kinda 90's but better than a white screen while the world changes
Lets try something local
Doing this directly on formatter but should on beta3 move to SBF?
Since we have defaults now and also 0 evaluates to false. Also make width and heigth and JSON KEY required elements.
Ok, now it should be Ok again
Should i sleep or more coffee?
@DiegoPino There is a strange issue, probably I'm doing something wrong. Image with Media formatter with IIIF Media and book with Page formatter with IAB when set width to 0 and height > 800 are displayed 723px x height while if I set width 1024 are displayed 1024px x height. |
@DiegoPino you can check that here: http://archipelago.byterfly.eu/node/25 http://archipelago.byterfly.eu/node/18 bith set to Maximum size: 100% x 900 pixels |
@giancarlobi thanks for reporting this. I just checked your site. I see right now this for the Media (openseadragon) container <div id="iiif-field_descriptive_metadata-d81e698a-a1b5-4c85-84b2-677e990e72da-0-media1" class="strawberry-media-item field-iiif container" data-iiif-infojson="http://archipelago.byterfly.eu/iiif-server/iiif/2/53d%2Fimage-giovane-uomo-del-ballerino-che-indossa-un-salto-russo-piega-del-costume-28730977_3.jpg/info.json" data-iiif-group="iiif-field_descriptive_metadata-d81e698a-a1b5-4c85-84b2-677e990e72da-0-media" data-iiif-thumbnails="1 as:image 900 http://archipelago.byterfly.eu/iiif-server/iiif/2 http://150.145.48.51:8182/iiif/2" style="width:100%; height:900px"> And style is correctly 100% and the height 900px. Maybe i'm missing something? Please let me know how this should behave to find the problem and fix it. Just in case i momentarily disabled JS aggregation in your performance configuration and also hit manually to make sure it refreshed from any caches, so that could have been also the case, all this JS makes browsers quite hungry for caching! Will look at a book now and report back! |
Also, i just found i was issuing a getSettings (see the s!) instead of singular for the thumbnails. That is not right and was adding a lot of info to that data- property in the HTML. FIXED!
@DiegoPino It's working good!!! It was my misunderstanding about how that works. As you suggested, resizing browser window ratio changes according 100% setting. Sorry and thanks. |
Cool. I will also ingest a 3D Model if you are OK with that =) |
Sure!!! |
@DiegoPino Also PDF works great! http://archipelago.byterfly.eu/node/29 In addition also 100% x auto is great, currently set un object linked above |
@giancarlobi great! 3D model up and working =) I added an PNG image (the texture) to the ADO too. Not used right (only as thumb i guess) but we will be able to allow the 3D to load any as:images as textures too soon =) I left the stub code there |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DiegoPino also no errors in log so for me ready to merge!
@giancarlobi we made it! Great, thanks for all the testing. This will make Phone users and theming way easier. I appreciate this |
ISSUE-59: Allow 100% with for all formatters and some ++candy (#60)
See #59
What is new?
All(well almost) formatters now support '0' width option to be used as a stub for 100% width.
The others, like some formatters that depend on Canvases (which need to have a fixed pixel size)e.g 3D one have an extra sizing functionality via JS that contracts the given canvas size in pixel to whatever is smaller (screen smaller than fixed with? We shrink to screen and redraw. Awesome!).
Also, other Formatters that totally need to have control over aspect ratio like PDF and Video allow to set '0' to force an
auto
height on a givenfixed
width. Great for avoiding squeezed video and PDFs like from 1997 when i was alive...and coding..What else is new?
So JS improvements, like a
CSS
based preloader for our3D Viewer
(who wants to wait looking at a white screen for a 3D skull of 10 Mbytes to render? Not me !)Also all Formatter summaries in the Display Mode configs reflect this many options. Either
pixel X pixel
,% x pixel
or% by auto
. Cool!We can now render a single frame of 3D into a base64 encoded Image! Well, with some little more code (like an html div and an img src where to put that data, not really code right! We can generate on the fly thumbnails for 3D. (no iiif for that... there is no iiif for 3d, even when there are
3 x is
in iiif)I also added an extra mime type of
model/obj
Did you kids know Drupal8 ships with not so many useful mime types of us repo users?I had to rebase a few times so some things could look weird. Will squash when done to cover my strange rebase (if any.. am i a good re-baser?...)