mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-29 00:26:10 +03:00
Added simulated left/right rotate clicks to the test case.
This commit is contained in:
parent
0bfb834393
commit
3f095c71cf
@ -52,6 +52,15 @@
|
||||
ok(viewer.showRotationControl, 'showRotationControl should be true');
|
||||
ok(-1 != viewer.buttons.buttons.indexOf(viewer.rotateLeft), "rotateLeft should be found");
|
||||
ok(-1 != viewer.buttons.buttons.indexOf(viewer.rotateRight), "rotateRight should be found");
|
||||
|
||||
// Now simulate the left/right button clicks. Security prevents us from simulating a click,
|
||||
// so we will call the 'onRelease' handler for the button
|
||||
ok(viewer.viewport.degrees === 0, "Image should start at 0 degrees rotation");
|
||||
viewer.rotateLeft.onRelease();
|
||||
ok(viewer.viewport.degrees === 270, "Image should be 270 degrees rotation (left)");
|
||||
viewer.rotateRight.onRelease();
|
||||
ok(viewer.viewport.degrees === 0, "Image should be 270 degrees rotation (right)");
|
||||
|
||||
start();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user