documentcloud / wordpress-documentcloud

Embed DocumentCloud documents that won't be eaten by the visual editor

Home Page:https://wordpress.org/plugins/documentcloud/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Aspect ratio argument for embeds

eyeseast opened this issue · comments

I would love to be able to tell a document to maintain an aspect ratio as width changes. For example, keep the embed at 8.5 x 12 (allowing for chrome).

This might be something better implemented in DocumentCloud itself, but it may be possible within the shortcode, using some added JS. (cc: @knowtheory)

So the new viewer is currently entirely constructed around the notion of aspect ratio as the primary consideration.

I don't know whether we're going to try and incorporate this into the existing viewer (the existing viewer basically freezes its initial dimensions and uses them to calculate widths and positions of a variety of elements, making it pretty challenging to dynamically resize. The existing mechanism for dealing with that is asking the viewer to redraw itself using the viewer API).

A new viewer? That's exciting. I'm fine to close this if it's being handled upstream.