These are chat archives for openseadragon/openseadragon

22nd
Jun 2016
VoidVolker
@VoidVolker
Jun 22 2016 04:25
@avandecreme thanks, so, what exactly there happens?
if I understand correct, there need to add check for last line and last row and get correct sizes?
VoidVolker
@VoidVolker
Jun 22 2016 05:48
@iangilman what is viewportTL and viewportBR?
ah, found..
VoidVolker
@VoidVolker
Jun 22 2016 06:05
ok, if I understand correct, the bug in getting of top left and bottom right tiles
foobarable
@foobarable
Jun 22 2016 06:16
@sickrandir How do you react on a click event? I remember you where using angular too?
sickrandir
@sickrandir
Jun 22 2016 06:57
yes @foobarable, I'm using angular. I just manage things in the html element. So for example the html element that I add as a control with the previous function would look something like this: <button id="id1" class="btn btn-mod btn-border btn-circle" ng-click="openView(0)">Front</button>
where openView(0) is a function binded to $scope
foobarable
@foobarable
Jun 22 2016 06:59
you do this at runtime?
i tried exactly the same generating the control in my angular-openseadragon directive
but then the generated html is not parsed anymore i think
This message was deleted
var previousButton = document.createElement("div"); previousButton.id = "previousImage"; previousButton.innerHTML = '<img alt="Previous image" src="assets/images/openseadragon/previous_rest.png" ng-click="previousImage()" style="background: transparent none repeat scroll 0% 0%; border: medium none; margin: 0px; padding: 0px; position: static;">'; previousButton.title = "Previous image"; scope.osd.addControl(previousButton, {anchor: OpenSeadragon.ControlAnchor.TOP_LEFT});
:/
sickrandir
@sickrandir
Jun 22 2016 07:03
I don't create the html elements at runtime. For the controls I just use static html in the view to which I attach the ng-click directive
foobarable
@foobarable
Jun 22 2016 07:03
ah, okay
yeah, that could work
sickrandir
@sickrandir
Jun 22 2016 07:04
if you can put up an example online I'll look into it
foobarable
@foobarable
Jun 22 2016 07:52
i will, hold on
foobarable
@foobarable
Jun 22 2016 08:30
@sickrandir i will try to generate those buttons statically for each viewer i use
Antoine Vandecreme
@avandecreme
Jun 22 2016 12:33
@VoidVolker the first issue is that we are calling TileSource.getTileAtPoint with x outside [0,1] and y outside [0,aspectRatio]
once that is fixed, yes we need to add some logic to handle the fact that the last tiles of a row or column are smaller than the others
And I think renaming TL and BR to topLeft and bottomRight would be nice. It always takes me some time to figure it out as well :)
sickrandir
@sickrandir
Jun 22 2016 13:30
@foobarable Let me know. :+1:
VoidVolker
@VoidVolker
Jun 22 2016 13:47
@avandecreme ok, if I understand correctly, viewport is always [0,0] - [1,1]?
and, when we call getTileAtPoint outside viewport we will get calculation error, because getTileAtPointthink about square tiles
Antoine Vandecreme
@avandecreme
Jun 22 2016 13:58
[0,0] - [1,aspectRatio of the image]
and yes you are correct about getTileAtPoint