can3p/iviewer — Issue #16: Rotation Possible
Author: kencaron
Created: 2012-02-02 18:10:15+00:00
State: open

I'm working on a project that acts as a document viewer (scanned text pages and the like) It's a requirement for me to have a rotation function, so I've been using CSS3 transforms tied to JS so we only rotate at 90 degree angles. This works great in modern browsers with the exception of the height and width not switching for the purposes of panning. It's still detecting the boundaries of the image as if it were in it's original orientation. In other words, if I start with a tall "portrait" image, and rotate it to be a wide "landscape" image, it is still behaving like a portrait image when I try to drag the image while zoomed in.

I was hoping the update() or update update_container_info() would help me out, but no. I don't mind editing the plugin if you tell me which function to look in and which variables define the bounding box for panning.

Thanks, I tried a few plugins like this and this one is the best and most extensible yet.