Use Point.read() for center parameter in Item#rotate

This commit is contained in:
Jürg Lehni 2013-12-11 17:09:03 +01:00
parent da427e969b
commit 3ff4a6d801

View file

@ -2585,9 +2585,10 @@ var Item = Base.extend(Callback, /** @lends Item# */{
* path.rotate(3, view.center);
* }
*/
rotate: function(angle, center) {
rotate: function(angle /*, center */) {
return this.transform(new Matrix().rotate(angle,
center || this.getPosition(true)));
Point.read(arguments, 1, 0, { readNull: true })
|| this.getPosition(true)));
}
}, Base.each(['scale', 'shear', 'skew'], function(name) {
this[name] = function() {