These are chat archives for msalsbery/OpenSeadragonImaging

19th
Jul 2015
Sandy
@sandymclean
Jul 19 2015 03:51
I'm here as well
Mark Salsbery
@msalsbery
Jul 19 2015 04:11
Cool. I was just remembering I have one room for the trio of plugins
If you get a chance, could you please use the non-minified plugin code so we can see the offending line with meaningful names?
Sandy
@sandymclean
Jul 19 2015 04:25
sure let me try it now
Just updated the issue with the new trace back
Sandy
@sandymclean
Jul 19 2015 04:30
while i have your attention M, i have a question about svg overlays and the coordinate stuff
Sandy
@sandymclean
Jul 19 2015 04:47
Is it possible to put an event listener on an element containing the svg overlay?
Mark Salsbery
@msalsbery
Jul 19 2015 04:56
It is possible, yes, but browser implementations vary. If I recall correctly, WebKit browsers don't bubble events from SVG elements like they should, so an SVG element can prevent an underlying element from receiving the event.
This has forced me, in my annotation framework implementation,
to handle all events on a canvas parent of the SVG and forward them to the overlay elements. It's a pain, but it brings flexibility too.
Sandy
@sandymclean
Jul 19 2015 05:04
kinda makes sense
what im trying to achieve is: svg overlay in the viewer, currently its underneath the main image. so clicking on that area does nothing. so i could get the element that is holding the svg overlay to stack on top of the main image. that would of course mean that when i click that, the basic functions of panning and stuff wont work
Mark Salsbery
@msalsbery
Jul 19 2015 05:13
It's nice to control all the eventing from one "class"/element but then things built in need to be done manually. Hit testing is a big one, and all browsers seem to do a great job on SVG elements, so I use a bi-directional interface between the annotation host (which manages the list of its annotations and represents the element that gets the actual events) and the annotations (which can be complex/compound elements). The host can ask an annotation if a point is in its boundaries, if it wants to be dragged/resized etc., while annotations can query the host for info they need to render themselves, like zoom factor, viewport dimensions, etc.
Sorry, a bit more than you asked heh :)
Right, I see what you're saying, and my annotation host plugin can manage all those issues. It's just not finished sadly
I use what I call cursor modes to determine if events should or should not propagate to the viewer. For example, if user is dragging or resizing an annotation then I don't want the viewer panning.
Sandy
@sandymclean
Jul 19 2015 05:56
is this annotation plugin meant for "marking up" images with shapes / lines/ etc?
because.... I need that
Mark Salsbery
@msalsbery
Jul 19 2015 06:06
Yes it is!
Sandy
@sandymclean
Jul 19 2015 06:08
My project is thus: I will need to digitize physical mark ups of pictures. Ill get a digital copy of the picture with a physical marked up image to go along with it. Ill need a tool to open the image and duplicate those annotations. Then I need to save the image and appropriate coordinates so that I can pass them as params to the svg overlay plugin for the viewer.
Mark Salsbery
@msalsbery
Jul 19 2015 06:15
Totally doable. My background is medical imaging - annotating many image types. Huge high-Resolution microscope images led me to deep zoom, first in Silverlight and now with OpenSeadragon
Sandy
@sandymclean
Jul 19 2015 06:16
yea thats what im working with
Mark Salsbery
@msalsbery
Jul 19 2015 06:17
I should start pushing OpenSeadragon
Sandy
@sandymclean
Jul 19 2015 06:18
what ya mean?
Mark Salsbery
@msalsbery
Jul 19 2015 06:19
AnnoHost code soon. I've been idle while the big multi image support work got done. Now my imaging plugin suite needs to catch up! :)
I meant OpenSeadragonAnnoHost, the 3rd of the imaging plugins that work together
I'll be pushing code for that soon now
Sandy
@sandymclean
Jul 19 2015 06:22
yea i would definitely use that
did you take a look at that bug yet?
Mark Salsbery
@msalsbery
Jul 19 2015 06:24
Not yet, I'm not even at computer. Busy weekend but I'll find a few minutes eventually