Use radians for hue rotation
This commit is a cherry-pick from 7f578f0. Conflicts: src/ol/renderer/dom/domlayerrenderer.js
This commit is contained in:
@@ -76,10 +76,10 @@ keyboardInteraction.addCallback('C', function() {
|
||||
layer.setContrast(Math.min(3, layer.getContrast() + 0.1));
|
||||
});
|
||||
keyboardInteraction.addCallback('h', function() {
|
||||
layer.setHue(layer.getHue() - 10);
|
||||
layer.setHue(layer.getHue() - (Math.PI / 5));
|
||||
});
|
||||
keyboardInteraction.addCallback('H', function() {
|
||||
layer.setHue(layer.getHue() + 10);
|
||||
layer.setHue(layer.getHue() + (Math.PI / 5));
|
||||
});
|
||||
keyboardInteraction.addCallback('o', function() {
|
||||
layer.setOpacity(layer.getOpacity() - 0.1);
|
||||
|
||||
@@ -216,7 +216,7 @@ goog.exportProperty(
|
||||
|
||||
/**
|
||||
* Apply a hue-rotation to the layer. A value of 0 will leave the hue
|
||||
* unchanged. Other values are degrees around the color circle.
|
||||
* unchanged. Other values are radians around the color circle.
|
||||
* @param {number} hue Hue.
|
||||
*/
|
||||
ol.layer.Layer.prototype.setHue = function(hue) {
|
||||
|
||||
Reference in New Issue
Block a user