Define Size#clone(), fixing a failing test.

This commit is contained in:
Jürg Lehni 2011-06-27 14:44:58 +02:00
parent 4c09514a8f
commit 2fd623d5b9

View file

@ -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!