Canvas API: allow passing image size as vector
This commit is contained in:
parent
72a1a0047e
commit
bf3cd83c61
1 changed files with 7 additions and 2 deletions
|
@ -784,9 +784,14 @@ var Image = {
|
|||
return me;
|
||||
},
|
||||
# Set size of image element
|
||||
setSize: func(width, height)
|
||||
#
|
||||
# @param width
|
||||
# @param height
|
||||
# - or -
|
||||
# @param size ([width, height])
|
||||
setSize: func
|
||||
{
|
||||
me._node.setValues({size: [width, height]});
|
||||
me._node.setValues({size: _arg2valarray(arg)});
|
||||
return me;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue