Remove brightness/contrast from side-by-side example
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user