dimensions of multiple items are not calculated correctly #16
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We need a common mechanism to handle rendering and on window resizing of all iframes present on a page.
Items of different types on the same page cause dimension problems.
The idea might be to inject w/h into the iframe before it is rendered.
could it be to hold the iframe at 100% width of the upper container?
then it would be held inside the main area that adapts to different screen sizes?
When using oembed with Vimeo and Sketchfab, "width" and "height" are included in the returned iframe attributes in pixels. But we want width to be 100% (or some other percentage defined by our users). So we need a way to calulated that.
My proposal is to, before rendering, calulate the ratio using the dimensions returned by the oembed API and then, change the width to 100% (or what ever) and remove the height. Then, on the client, use jQuery to get the width in pixels of the iframe and use the ratio to calulate and insert the height
I have included this in both the Vimeo and Sketchfab modules. It works.
This new module correctly handles the dimensions of embeded media
https://git.hangar.org/arcHIVE-tech/oEmbed-omeka-module
Compatible media types: