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:
tschaub
2012-10-25 18:36:35 -06:00
committed by Éric Lemoine
parent 4d97b583c6
commit 9622395c86
2 changed files with 3 additions and 3 deletions

View File

@@ -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);

View File

@@ -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) {