fix bug in pixel method (arguments parsing)

This commit is contained in:
rolux 2012-06-28 18:36:25 +02:00
parent 864eacfbd7
commit c211b55d3b

View file

@ -682,9 +682,9 @@ Ox.load.Image = function(options, callback) {
val <[n]> RGBA values
@*/
that.pixel = function() {
var xy = arguments.length == 1 || Ox.isArray(arguments[1])
var xy = Ox.isArray(arguments[0])
? arguments[0] : [arguments[0], arguments[1]],
val = Ox.isArray(Ox.last(arguments))
val = arguments.length > 1 && Ox.isArray(Ox.last(arguments))
? Ox.last(arguments) : null,
i = getIndex(xy),
ret;