These are chat archives for openseadragon/openseadragon

15th
Apr 2016
sujay
@sxv
Apr 15 2016 03:42
Hi all, forgive me if this is already in the documentation / issues somewhere but I couldn't find it. I have a "zoom" handler attached to my viewer that triggers a function whenever the user zooms within the viewer. That is good. However, I also sometimes programmatically zoom this viewer with viewer.viewport.zoomTo(x), and I do not want my event handler function to trigger in these programmatic cases. How can I determine whether a zoom event was triggered programmatically or by user?
sujay
@sxv
Apr 15 2016 04:48
I've temporarily solved this with a boolean flag.
Illya Moskvin
@IllyaMoskvin
Apr 15 2016 13:35
@altert I like the ship demo! Very cinematic, and skeuomorphic - haven't seen anything like that done with OSD before. However, I must admit, I can't find the horizontal rotation slider in the virtual-museum link you sent. Am I missing something?
Alexey Tikhonov
@altert
Apr 15 2016 13:48
@IllyaMoskvin that’s actually a demo for real world object, so the illuminators will be real objects over a touch screen
@IllyaMoskvin slider is usually disabled there, I’ve enabled it just to show you. let me enable it again
Illya Moskvin
@IllyaMoskvin
Apr 15 2016 13:49
@altert Nice! And thanks, I'll go check it out right now.
Alexey Tikhonov
@altert
Apr 15 2016 13:49
it’s enabled now. there are rotation icons, one of them shows slider
Illya Moskvin
@IllyaMoskvin
Apr 15 2016 13:50
Very nice! Even smoother than I expected.
Alexey Tikhonov
@altert
Apr 15 2016 13:51
btw, you can enable touch gestures for rotation in osd
Illya Moskvin
@IllyaMoskvin
Apr 15 2016 13:51
What do you think is better in terms of usability: setting rotation vs. the center of the image, or setting the rotation vs. the center of the viewport?
Alexey Tikhonov
@altert
Apr 15 2016 13:52
in general I’d think center of the image
but it depends on the application
Illya Moskvin
@IllyaMoskvin
Apr 15 2016 13:52
This message was deleted
This message was deleted
Alexey Tikhonov
@altert
Apr 15 2016 13:53
gestureSettingsMouse in options
err gestureSettingsTouch
Illya Moskvin
@IllyaMoskvin
Apr 15 2016 13:53
This message was deleted
Alexey Tikhonov
@altert
Apr 15 2016 13:54
in my experience it’s easy to confuse pinchToZoom and pinchRotate, so I’m not sure if it’s always useful to have them both enabled
Illya Moskvin
@IllyaMoskvin
Apr 15 2016 13:56
Mixing together zooming and rotational gestures is something that I find Google Maps does exceptionally well. I imagine that if OSD has free rotate w/ gesture, it'd look something like that. Thank you for showing me the slider-rotate demo!
Alexey Tikhonov
@altert
Apr 15 2016 13:58
np. I haven’t used pinchRotate much, you should try it, maybe I used it wrong
btw, have you been able to work on compare plugin? the idea is wonderful
Illya Moskvin
@IllyaMoskvin
Apr 15 2016 14:01
Not since I've made that demo. But I'll actually be returning to that project next week, so I'll get a chance to work on it some more.
Alexey Tikhonov
@altert
Apr 15 2016 14:01
cool
Illya Moskvin
@IllyaMoskvin
Apr 15 2016 14:03
I've actually had some concerns w/ it. I'm not sure how to handle viewers that have more that two images loaded (i.e. one for the normal, one for the alternative). I think comparison is something that will have to be restricted to when only two images are loaded. Or when each image has an alternative specified.
There's also the fact that it currently needs one to specify callbacks in tileSources to retrieve the TiledImage, iirc. I'm not sure how to retrieve the TiledImagefrom the viewer instance w/out callbacks.
Alexey Tikhonov
@altert
Apr 15 2016 14:10
m viewer.world.getItemAt(i) ?
Antoine Vandecreme
@avandecreme
Apr 15 2016 15:02
To reply to that: What do you think is better in terms of usability: setting rotation vs. the center of the image, or setting the rotation vs. the center of the viewport?
Currently, there is only rotation around the center of the content bounds.
The next step would be to add rotation of images
for example you have 2 images, one rotated at 45deg the other at 90
and on top of that you would be able to rotate the viewport like now.
Antoine Vandecreme
@avandecreme
Apr 15 2016 15:07
Regarding the compare plugin, maybe it would make more sense for it to be a library on it own which happen to have a dependency on OSD?
Ian Gilman
@iangilman
Apr 15 2016 16:40
@sxv Yeah, setting a flag is probably your best bet... there's no explicit mechanism for it
Alexey Tikhonov
@altert
Apr 15 2016 16:41
@iangilman I’ve considered adding sprint to setRotation, but it proved somewhat difficult for me, so I’ve used tween, thanks for suggestion
Ian Gilman
@iangilman
Apr 15 2016 16:42
Fair enough. Might be the better choice anyway.