mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Use Point.read() for center parameter in Item#rotate
This commit is contained in:
parent
da427e969b
commit
3ff4a6d801
1 changed files with 3 additions and 2 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue