1
0
Fork 0
forked from 0x2620/oxjs

make Ox.rgb always return integers

This commit is contained in:
rolux 2012-06-24 17:41:27 +02:00
commit d29bc5569b
4 changed files with 9 additions and 25 deletions

View file

@ -80,9 +80,7 @@ Ox.ColorInput = function(options, self) {
function getRGB() {
return self.options.mode == 'rgb'
? self.options.value
: Ox.rgb(self.options.value).map(function(value) {
return Math.round(value);
});
: Ox.rgb(self.options.value);
}
return that;

View file

@ -109,11 +109,7 @@ Ox.ColorPicker = function(options, self) {
}
function getRGB(values) {
return self.options.mode == 'rgb'
? values
: Ox.rgb(values).map(function(value) {
return Math.round(value);
});
return self.options.mode == 'rgb' ? values : Ox.rgb(values);
}
return that;