mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Facilitate minification.
This commit is contained in:
parent
1ca23a681a
commit
1fad295600
3 changed files with 6 additions and 3 deletions
|
@ -747,7 +747,8 @@ var Point = Base.extend(/** @lends Point# */{
|
||||||
* @return {Boolean} {@true if both x and y are 0}
|
* @return {Boolean} {@true if both x and y are 0}
|
||||||
*/
|
*/
|
||||||
isZero: function() {
|
isZero: function() {
|
||||||
return Numerical.isZero(this.x) && Numerical.isZero(this.y);
|
var isZero = Numerical.isZero;
|
||||||
|
return isZero(this.x) && isZero(this.y);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -388,7 +388,8 @@ var Size = Base.extend(/** @lends Size# */{
|
||||||
* @return {Boolean} {@true if both width and height are 0}
|
* @return {Boolean} {@true if both width and height are 0}
|
||||||
*/
|
*/
|
||||||
isZero: function() {
|
isZero: function() {
|
||||||
return Numerical.isZero(this.width) && Numerical.isZero(this.height);
|
var isZero = Numerical.isZero;
|
||||||
|
return isZero(this.width) && isZero(this.height);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -73,10 +73,11 @@ var SegmentPoint = Point.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
isZero: function() {
|
isZero: function() {
|
||||||
|
var isZero = Numerical.isZero;
|
||||||
// Provide our own version of Point#isZero() that does not use the x / y
|
// Provide our own version of Point#isZero() that does not use the x / y
|
||||||
// accessors but the internal properties directly, for performance
|
// accessors but the internal properties directly, for performance
|
||||||
// reasons, since it is used a lot internally.
|
// reasons, since it is used a lot internally.
|
||||||
return Numerical.isZero(this._x) && Numerical.isZero(this._y);
|
return isZero(this._x) && isZero(this._y);
|
||||||
},
|
},
|
||||||
|
|
||||||
isSelected: function() {
|
isSelected: function() {
|
||||||
|
|
Loading…
Reference in a new issue