These are chat archives for openseadragon/openseadragon

11th
Jun 2015
Antoine Vandecreme
@avandecreme
Jun 11 2015 13:30
"I see how to zoom, but how do I enhance?" > We need to work on that feature :)
Ian Gilman
@iangilman
Jun 11 2015 16:57
@avandecreme For sure :)
Antoine Vandecreme
@avandecreme
Jun 11 2015 17:04
@iangilman I am considering to add both tile-unloading and tile-unloaded events. The first one would be call at the beginning of tileCache._unloadTile and the other at the end.
Ian Gilman
@iangilman
Jun 11 2015 17:04
What's the purpose of having both?
Antoine Vandecreme
@avandecreme
Jun 11 2015 17:04
The reason is it might be too late for the user when tile-unloaded has been called.
Ian Gilman
@iangilman
Jun 11 2015 17:04
Too late to do what?
Antoine Vandecreme
@avandecreme
Jun 11 2015 17:04
I am fine with having just tile-unloading
to access things that get destroyed by unload
maybe there is no real usecase though
Ian Gilman
@iangilman
Jun 11 2015 17:06
Seems like we shouldn't add it until we have a clear use in mind
Antoine Vandecreme
@avandecreme
Jun 11 2015 17:06
alright
Ian Gilman
@iangilman
Jun 11 2015 17:06
But the question of whether we should fire an event at the beginning of the unload or at the end is interesting. Seems like at the end is good.
I'm imagining the only use is to clean up any extra memory you have allocated.
And tile-unloaded matches tile-loaded of course
Antoine Vandecreme
@avandecreme
Jun 11 2015 17:08
that is my use case yes
Ian Gilman
@iangilman
Jun 11 2015 17:09
Does at the end seem reasonable? Would anything be cleared out that you need?
Antoine Vandecreme
@avandecreme
Jun 11 2015 17:12
not that I can think of right now. And having tile-unloaded at the end leave the possibility to add tile-unloading at the beginning if needed anyway.
Ian Gilman
@iangilman
Jun 11 2015 17:12
True
Antoine Vandecreme
@avandecreme
Jun 11 2015 17:21
pushed. I couldn't think of an easy way to write a unit test for that event though
Ian Gilman
@iangilman
Jun 11 2015 17:23
Call .reset on the image? That should trigger an unload I think...
Antoine Vandecreme
@avandecreme
Jun 11 2015 17:25
Ha, I will try
Ian Gilman
@iangilman
Jun 11 2015 17:26
:)