These are chat archives for openseadragon/openseadragon

8th
Jun 2017
Joohansson
@Joohansson
Jun 08 2017 18:47

Hi, a question. I use runtime overlay from this example: https://openseadragon.github.io/examples/ui-overlays/
Create a rect like this:
viewer.addOverlay({
element: elt,
location: new OpenSeadragon.Rect(0.33, 0.75, 0.2, 0.25)
});

Is it possible to rotate that rectangle/overlay? Providing a rotation to the rect constructor does nothing. Can I create a rotated rectangle overlay by other means?

Illya Moskvin
@IllyaMoskvin
Jun 08 2017 20:53
I'd just target it with CSS and add transform: rotate(45deg) or whatever is appropriate.
The example shows how to add className or id to the overlay element. You can use either of those to target it.