documentcloud / wordpress-documentcloud

Embed DocumentCloud documents that won't be eaten by the visual editor
https://wordpress.org/plugins/documentcloud/
GNU General Public License v2.0
9 stars 14 forks source link

Aspect ratio argument for embeds #9

Closed eyeseast closed 10 years ago

eyeseast commented 10 years ago

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)

knowtheory commented 10 years ago

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).

eyeseast commented 10 years ago

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