mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-19 17:21:50 +03:00
Fixed issues with panning in scroll view (m2)
This commit is contained in:
parent
ae3b100483
commit
a923c3f09c
@ -1,4 +1,7 @@
|
|||||||
# To Do
|
# To Do
|
||||||
|
|
||||||
* Support 400+ page collections
|
* Support 400+ page collections
|
||||||
|
* Choosing between multiple versions of a page
|
||||||
|
* Detail images overlaid on the page
|
||||||
|
* Cropped images
|
||||||
* Show/hide pages?
|
* Show/hide pages?
|
||||||
|
@ -57,10 +57,10 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.viewer.addHandler('canvas-drag', function() {
|
this.viewer.addHandler('canvas-drag', function() {
|
||||||
if (this.mode === 'scroll') {
|
if (self.mode === 'scroll') {
|
||||||
var result = this.hitTest(this.viewer.viewport.getCenter());
|
var result = self.hitTest(self.viewer.viewport.getCenter());
|
||||||
if (result) {
|
if (result) {
|
||||||
this.page = result.index;
|
self.page = result.index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -267,7 +267,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (x !== center.x || y !== center.y) {
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user