Fixed issues with panning in scroll view (m2)

This commit is contained in:
Ian Gilman 2015-01-22 11:52:08 -08:00
parent ae3b100483
commit a923c3f09c
2 changed files with 8 additions and 4 deletions

View File

@ -1,4 +1,7 @@
# To Do
* Support 400+ page collections
* Choosing between multiple versions of a page
* Detail images overlaid on the page
* Cropped images
* Show/hide pages?

View File

@ -57,10 +57,10 @@
});
this.viewer.addHandler('canvas-drag', function() {
if (this.mode === 'scroll') {
var result = this.hitTest(this.viewer.viewport.getCenter());
if (self.mode === 'scroll') {
var result = self.hitTest(self.viewer.viewport.getCenter());
if (result) {
this.page = result.index;
self.page = result.index;
}
}
});
@ -267,7 +267,8 @@
}
if (x !== center.x || y !== center.y) {
this.viewer.viewport.panTo(new OpenSeadragon.Point(x, y), true);
this.viewer.viewport.centerSpringX.current.value = x;
this.viewer.viewport.centerSpringY.current.value = y;
}
}
},