mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-19 09:11:45 +03:00
Merge pull request #2257 from pearcetm/fix-navigator-tests
Fix navigator tests
This commit is contained in:
commit
2d713783ba
@ -248,14 +248,8 @@
|
||||
};
|
||||
|
||||
var dragNavigatorBackToCenter = function () {
|
||||
var start = viewer.viewport.getBounds().getTopLeft(),
|
||||
target = new OpenSeadragon.Point(0.5 - viewer.viewport.getBounds().width / 2,
|
||||
1 / viewer.source.aspectRatio / 2 - viewer.viewport.getBounds().height / 2),
|
||||
delta = target.minus(start);
|
||||
if (viewer.source.aspectRatio < 1) {
|
||||
delta.y *= viewer.source.aspectRatio;
|
||||
}
|
||||
simulateNavigatorDrag(viewer.navigator, delta.x * displayRegionWidth, delta.y * displayRegionHeight);
|
||||
var delta = viewer.viewport.getHomeBounds().getCenter().minus(viewer.viewport.getCenter()).times(displayRegionWidth);
|
||||
simulateNavigatorDrag(viewer.navigator, delta.x, delta.y);
|
||||
};
|
||||
|
||||
var resizeElement = function ($element, width, height) {
|
||||
|
@ -50,6 +50,6 @@
|
||||
<script src="/test/modules/tilesource-dynamic-url.js"></script>
|
||||
<!--The navigator tests are the slowest (for now; hopefully they can be sped up)
|
||||
so we put them last. -->
|
||||
<!-- The navigator tests are failing right now, so we have them disabled for the moment <script src="/test/modules/navigator.js"></script> -->
|
||||
<script src="/test/modules/navigator.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user