Remove brightness/contrast from side-by-side example

This commit is contained in:
Tom Payne
2013-03-07 01:54:51 +01:00
parent bea6b644af
commit 50cb6294ee
2 changed files with 0 additions and 17 deletions

View File

@@ -60,8 +60,6 @@
<dd>double-click, <code>Shift</code>+double-click, mouse wheel, <code>+</code>/<code>-</code> keys; <code>Shift</code>+drag</dd> <dd>double-click, <code>Shift</code>+double-click, mouse wheel, <code>+</code>/<code>-</code> keys; <code>Shift</code>+drag</dd>
<dt>Rotate</dt> <dt>Rotate</dt>
<dd><code>Alt+Shift</code>+drag, <code>r</code> to reset</dd> <dd><code>Alt+Shift</code>+drag, <code>r</code> to reset</dd>
<dt>Brightness/contrast</dt>
<dd><code>b</code>/<code>B</code>/<code>c</code>/<code>C</code> keys (WebGL only)</dd>
<dt>Opacity</dt> <dt>Opacity</dt>
<dd><code>o</code>/<code>O</code> keys</dd> <dd><code>o</code>/<code>O</code> keys</dd>
<dt>Visibility</dt> <dt>Visibility</dt>

View File

@@ -53,24 +53,9 @@ if (canvasMap !== null) {
var keyboardInteraction = new ol.interaction.Keyboard(); var keyboardInteraction = new ol.interaction.Keyboard();
keyboardInteraction.addCallback('0', function() { keyboardInteraction.addCallback('0', function() {
layer.setBrightness(0);
layer.setContrast(1);
layer.setOpacity(1); layer.setOpacity(1);
layer.setVisible(true); layer.setVisible(true);
}); });
keyboardInteraction.addCallback('b', function() {
layer.setBrightness(layer.getBrightness() - 0.1);
});
keyboardInteraction.addCallback('B', function() {
layer.setBrightness(layer.getBrightness() + 0.1);
});
keyboardInteraction.addCallback('c', function() {
layer.setContrast(layer.getContrast() - 0.1);
});
keyboardInteraction.addCallback('C', function() {
// contrast is unbounded, but for this example we clamp to 3
layer.setContrast(Math.min(3, layer.getContrast() + 0.1));
});
keyboardInteraction.addCallback('j', function() { keyboardInteraction.addCallback('j', function() {
var bounce = ol.animation.bounce({ var bounce = ol.animation.bounce({
resolution: 2 * view.getResolution() resolution: 2 * view.getResolution()