Skip to content

Commit

Permalink
Merge pull request #192 from nelsonn3c/flipControls
Browse files Browse the repository at this point in the history
Adds three new keyboard controls.
  • Loading branch information
iangilman authored Jul 20, 2018
2 parents daad959 + b5c00bb commit dc487a6
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions www/ui-keyboard-navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
{
background-color: lightgrey;
}

</style>

<h2>example: keyboard navigation</h2>

<p>The viewer supports keyboard operations to complement the drag and scroll
<p>The viewer supports keyboard operations to complement the drag and scroll
(zoom) mouse interactions.</p>

<p>
To interact via the keyboard, the focus must be on the viewer.
In this example the focus is set using
In this example the focus is set using
<code>document.getElementById('contentDiv').querySelector('.openseadragon-canvas').focus();</code>
</p>

Expand All @@ -32,6 +32,9 @@ <h2>example: keyboard navigation</h2>
<li><strong>[ 0 ]</strong> - zoom / move viewport <strong>home</strong></li>
<li><strong>[ - / _, shift+W, shift+up arrow ]</strong> - zoom viewport <strong>out</strong></li>
<li><strong>[ = / +, shift+S, shift+down arrow ]</strong> - zoom viewport <strong>in</strong></li>
<li><strong>[ r ]</strong> - rotate <strong>clockwise</strong></li>
<li><strong>[ R ]</strong> - rotate <strong>counterclockwise</strong></li>
<li><strong>[ f ]</strong> - flip <strong>horizontally</strong></li>
</ul>

<div class="description">
Expand All @@ -55,12 +58,5 @@ <h3>Keyboard Navigation</h3>

viewer.addHandler('open', function (event) {
document.getElementById('contentDiv').querySelector('.openseadragon-canvas').focus();
});
});
</script>







0 comments on commit dc487a6

Please sign in to comment.