These are chat archives for openseadragon/openseadragon

16th
Jan 2018
Daunt
@DauntTBR_twitter
Jan 16 2018 17:21
anyone around to help me step through getting this working for me? i'm obviously new to it and can't really get any demo i've downloaded or set up working at all.
Ian Gilman
@iangilman
Jan 16 2018 17:23
@DauntTBR_twitter Sure...
Here's a basic working example: https://codepen.io/iangilman/pen/bdgWBz
What kind of image do you have? How big?
...and what kind of page are you trying to put it in to?
Daunt
@DauntTBR_twitter
Jan 16 2018 17:26
thank you. i have a 4k image i'm using right now. i'm trying to make it into a sort of map, so you can zoom in and really get into detail with marking out locations, etc
used deep zoom composer to export and got an XML file and some folders out of it which i tried using with the given HTML example found here ( https://openseadragon.github.io/docs/ ) but that didn't work at all so i'm not sure what i am doing wrong
Ian Gilman
@iangilman
Jan 16 2018 17:30
@DauntTBR_twitter Are you running a local server? What OS are you on? I assume Windows?
Daunt
@DauntTBR_twitter
Jan 16 2018 17:31
Windows. but i'm also testing using my own hosted website and that hasn't brought me any luck either
Ian Gilman
@iangilman
Jan 16 2018 17:31
Are you getting any errors in the console?
What does your folder structure look like?
Daunt
@DauntTBR_twitter
Jan 16 2018 17:34
hm. didn't think to check the console. that MIGHT be why. it's not looking for the .dzi in the proper spot
Ian Gilman
@iangilman
Jan 16 2018 17:35
Cool
What does your folder structure look like and what is the DZI path you give to OSD?
Daunt
@DauntTBR_twitter
Jan 16 2018 17:38
let me upload my example. one second
Daunt
@DauntTBR_twitter
Jan 16 2018 17:44
aha!
Ian Gilman
@iangilman
Jan 16 2018 17:45
Looking good!
Looks like you need to fix your prefixUrl so the button icons show up, but otherwise it seems to be working :)
Daunt
@DauntTBR_twitter
Jan 16 2018 17:46
yes just need to do that then work on figuring out coods for different icons and map spots
perfect
thank you
Ian Gilman
@iangilman
Jan 16 2018 17:48
Awesome... Glad to help!
@DauntTBR_twitter For the overlays, we have some overlay features built in, but there are also various overlay plugins available: http://openseadragon.github.io/#plugins
Daunt
@DauntTBR_twitter
Jan 16 2018 17:51
need to look through them carefully. need to add icons i've designed and then plot them in the right spots. then i'll have text notations and stuff to throw on there as wel.
Ian Gilman
@iangilman
Jan 16 2018 17:53
Cool. Do you want the text and icons to get bigger and smaller as the map zooms, or should they always stay the same size?
Daunt
@DauntTBR_twitter
Jan 16 2018 17:57
probably both! i think ones that stay fixed could be useful for calling out large areas but specific areas could be like that as well. or maybe even show up at smaller sizes
Jeff Gehrung
@CYouBlader_twitter
Jan 16 2018 17:59
Hi. This is my first post. Really enjoying working with openseadragon - appreciate the fine work. I'm trying to extend the selection plug-in drag funcitonality such that when I drag a clip against a border, it forces the underlying content to scroll. At the moment I'm detecting when selection border intersects with with viewport border and forcing a viewport.panTo() to position the article. Wonder if OSD already supports this or if someone else has done this? Maybe I should just be trapping/redirecting drag events?
Ian Gilman
@iangilman
Jan 16 2018 18:03
@DauntTBR_twitter Fair enough. You may need to do some special handling in that case. I like the SVG and canvas overlays because they allow you to draw however you want, but they do involve more work.
@CYouBlader_twitter I haven't heard of anyone creating that functionality, so you may be the first. Sounds like you're on the right track.
Daunt
@DauntTBR_twitter
Jan 16 2018 18:08
is it pretty straightforward to set up multiple layers using the mapped icons? perhaps the filtering plugin?
Ian Gilman
@iangilman
Jan 16 2018 18:10
It really depends on how you set up your overlays.
Daunt
@DauntTBR_twitter
Jan 16 2018 18:10
guess i need to read about those more first
Ian Gilman
@iangilman
Jan 16 2018 18:11
If you sue the SVG overlay, for instance, you can do anything you can do normally in SVG, including grouping objects together and interactively changing their opacity.
The SVG overlay doesn't handle any of that for you... You'd need to do it yourself, or use a library like d3 or Snap. The overlay just binds that to OSD in a zooming fashion.
If you use the canvas overlay it's up to you to draw your overlays every frame, so that gives you complete power, but also makes you do all the work (except for keeping track of the zoom location).
Both of those options work well if you want the text to grow and shrink as you zoom. The built-in OSD overlays use just the regular HTML and they don't scale the HTML as you zoom (but they do move them as you pan).
Jeff Gehrung
@CYouBlader_twitter
Jan 16 2018 18:15
@iangilman Thanks. Though I'd test the waters here before diving in further. Glad to know you're out there.
Ian Gilman
@iangilman
Jan 16 2018 18:16
:) Let us know how it goes!
Jeff Gehrung
@CYouBlader_twitter
Jan 16 2018 18:24
@iangilman Will do. Starting to think I should have started by simply redirecting drag events when a selection border intersects with viewport border, rather than attempting the more cumbersome pan/delta method and all that comes with it. (It forces me to take responsiblity for drag direction changes, button release, etc.) Oh well... Again, thanks. If it works, I'll make it available.
Ian Gilman
@iangilman
Jan 16 2018 18:27
Hmm... Hard for me to visualize. I would think explicitly panning is more robust than redirecting events, but I guess I'd have to look closer a the implementation to have a real opinion.
Daunt
@DauntTBR_twitter
Jan 16 2018 18:27
what is a good way to test it locally? seems my hosted server isn't giving me changes fast enough to test properly
Ian Gilman
@iangilman
Jan 16 2018 18:28
There are lots of ways to run a local server. I believe there's something built in to Visual Studio.
You could also run a simple Node server or use something like http://www.wampserver.com/en/
Jeff Gehrung
@CYouBlader_twitter
Jan 16 2018 18:43
@iangilman Don't want to bog you down with this... explicit panning does work well but forces me to deal with some default behaviors (e.g. panning the viewport causes the selection rect to pan with it - where I need the selection rect to remain in place having collided with a border, subsequently forcing the viewport to pan "beneath" it.)
Ian Gilman
@iangilman
Jan 16 2018 18:44
I see
Sounds like it might be worth making changes to the selection plugin to support this
Jeff Gehrung
@CYouBlader_twitter
Jan 16 2018 18:46
You're right, and precisely where I'm spending all my time !
  • Thanks.
Ian Gilman
@iangilman
Jan 16 2018 18:48
Cool :)