mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Define Size#clone(), fixing a failing test.
This commit is contained in:
parent
4c09514a8f
commit
2fd623d5b9
1 changed files with 7 additions and 0 deletions
|
@ -145,6 +145,13 @@ var Size = this.Size = Base.extend(/** @lends Size# */{
|
|||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns a copy of the size.
|
||||
*/
|
||||
clone: function() {
|
||||
return Size.create(this.width, this.height);
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the addition of the supplied value to the width and height of the
|
||||
* size as a new size. The object itself is not modified!
|
||||
|
|
Loading…
Reference in a new issue