mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Add Size#isZero().
This commit is contained in:
parent
638d768406
commit
10d56f318f
1 changed files with 9 additions and 0 deletions
|
@ -81,6 +81,15 @@ var Size = this.Size = Base.extend({
|
|||
return this.width == size.width && this.height == size.height;
|
||||
},
|
||||
|
||||
/**
|
||||
* Checks if this size has both the width and height set to 0.
|
||||
*
|
||||
* @return true if both width and height are 0, false otherwise.
|
||||
*/
|
||||
isZero: function() {
|
||||
return this.width == 0 && this.width == 0;
|
||||
},
|
||||
|
||||
isNaN: function() {
|
||||
return isNaN(this.width) || isNaN(this.height);
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue