These are chat archives for openseadragon/openseadragon

8th
May 2015
Bill Criswell
@crswll
May 08 2015 01:23
and I'm back, much fatter.
Bill Criswell
@crswll
May 08 2015 02:50
If I could figure out how to get the numbers to where the red squares are it should be good: http://crswll.github.io/sd/
Bill Criswell
@crswll
May 08 2015 14:31
Any tips on how to approach that would be awesome. I feel like the answer is right in front of my face but it's just not clicking.
Ian Gilman
@iangilman
May 08 2015 16:16
@crswll Looks like you have the start of an interesting game there ;)
Seems like you're working in DOM pixels when you should be working in viewport points
Btw, if you want to work with SVG, you could upgrade your OSD to the latest on master and then use https://github.com/openseadragon/svg-overlay
Ian Gilman
@iangilman
May 08 2015 16:21
At any rate, it appears that you're not scaling your SVG for the zoom factor...the rectangles stay the same size no matter how you zoom.
Bill Criswell
@crswll
May 08 2015 17:03
@iangilman Ah. I wasn't even sure why the SVG size was changing since I'm using the onDraw callback for add overLay
Ian Gilman
@iangilman
May 08 2015 17:04
Yeah, it's kind of funny...actually it's not changing, but it looks like it is compared to the viewer which is changing
Welcome to OSD optical illusion hour!
Bill Criswell
@crswll
May 08 2015 17:05
haha.
Little something I just noticed with the SVG overlay, is you spread to zoom on the SVG itself the window zooms instead of seadragon, could just be something with how the pointer event is set.
Ian Gilman
@iangilman
May 08 2015 17:09
Yeah, I noticed that as well, but forgot to file an issue. Would you care to file it?
Bill Criswell
@crswll
May 08 2015 17:10
Sure thing.
Ian Gilman
@iangilman
May 08 2015 17:10
I'm not sure what the fix is, but yeah, probably something to do with pointer events
Thanks :)
Bill Criswell
@crswll
May 08 2015 17:11
No problem at all haha. Least I could do.
Ian Gilman
@iangilman
May 08 2015 17:12
:)
Well, feel free to fix it as well if you'd like ;)
Bill Criswell
@crswll
May 08 2015 17:25
I can fix that problem, but then you can't click it haha
Ian Gilman
@iangilman
May 08 2015 17:25
:(
Maybe we have to pass the event through somehow?
Bill Criswell
@crswll
May 08 2015 17:30
Hmmm...
Bill Criswell
@crswll
May 08 2015 17:43
damn, thought i could get clever with document.elementFromPoint but no dice.
Ian Gilman
@iangilman
May 08 2015 17:44
:(
Bill Criswell
@crswll
May 08 2015 17:55
It must be something to do with the plugin itself. On my labels attempt I can click and spread.
Ian Gilman
@iangilman
May 08 2015 17:56
Interesting.
The plugin puts a SVG node over the entire viewer...I wonder if that's part of it
Bill Criswell
@crswll
May 08 2015 17:58
The funny thing is the click events work on the SVG element as well. I wonder if it's something with the D3 event?
Ian Gilman
@iangilman
May 08 2015 17:59
On your labels are you getting clicks?
Bill Criswell
@crswll
May 08 2015 17:59
http://crswll.github.io/sd/ yes, made the circle bigger
Ian Gilman
@iangilman
May 08 2015 18:03
Well, clicks certainly work on desktop. I can't tell on my touch device (iPhone)
The issue is with pinch zoom on Touch?
Bill Criswell
@crswll
May 08 2015 18:04
trackpad on my macbook
Ian Gilman
@iangilman
May 08 2015 18:04
Hmm...I guess it happens with scroll wheel on desktop
And sure enough, it's working on yours
You don't appear to be doing the pointer-events: none thing the plugin does
Bill Criswell
@crswll
May 08 2015 18:06
yeah I'm only using it in one place (on the number)
Ian Gilman
@iangilman
May 08 2015 18:07
Weird...if I don't use pointer-events="none" I don't get any events through to the viewer at all. How come they get through on yours?
Hmm...perhaps because you have put your SVG inside of the openseadragon-canvas div where as the plugin is outside of that?
Bill Criswell
@crswll
May 08 2015 18:08
are you using a standard listener or through d3 or whatever?
Ian Gilman
@iangilman
May 08 2015 18:08
Maybe inside is a better choice
Bill Criswell
@crswll
May 08 2015 18:09
Thinking I just got lucky haha
Ian Gilman
@iangilman
May 08 2015 18:09
It shouldn't matter how I'm listening for click events; just the presence of the d3 object is obscuring the events going to OSD.
So maybe just moving inside is the fix :)
Bill Criswell
@crswll
May 08 2015 18:10
That would be awesome
Ian Gilman
@iangilman
May 08 2015 18:11
Do you wanna give it a try?
(are you planning on using that plugin for your piece?)
Bill Criswell
@crswll
May 08 2015 18:12
I can give it a shot real quick.
Ian Gilman
@iangilman
May 08 2015 18:13
Awesome, thanks!
Bill Criswell
@crswll
May 08 2015 19:33
sorry was pulled into a meeting
Bill Criswell
@crswll
May 08 2015 19:40
ok cool, sent a pull request.
think i did it right, i always feel like i do omething wrong
Ian Gilman
@iangilman
May 08 2015 20:18
:) Awesome...I'll take a look in a bit
Thanks for chewing on it!
Bill Criswell
@crswll
May 08 2015 20:20
No problem.