code minifier

This commit is contained in:
sapics 2015-06-23 13:09:48 +09:00
parent 19bcd19b49
commit e15b23f8af
2 changed files with 14 additions and 15 deletions

View file

@ -474,12 +474,12 @@ var Rectangle = Base.extend(/** @lends Rectangle# */{
* @type Point
*/
/**
* The area of the rectangle in square points.
*
* @type Number
* @bean
*/
/**
* The area of the rectangle in square points.
*
* @type Number
* @bean
*/
getArea: function() {
return this.width * this.height;
},

View file

@ -87,9 +87,9 @@ var Tool = PaperScopeItem.extend(/** @lends Tool# */{
setMinDistance: function(minDistance) {
this._minDistance = minDistance;
if (this._minDistance != null && this._maxDistance != null
&& this._minDistance > this._maxDistance) {
this._maxDistance = this._minDistance;
if (minDistance != null && this._maxDistance != null
&& minDistance > this._maxDistance) {
this._maxDistance = minDistance;
}
},
@ -106,8 +106,8 @@ var Tool = PaperScopeItem.extend(/** @lends Tool# */{
setMaxDistance: function(maxDistance) {
this._maxDistance = maxDistance;
if (this._minDistance != null && this._maxDistance != null
&& this._maxDistance < this._minDistance) {
if (this._minDistance != null && maxDistance != null
&& maxDistance < this._minDistance) {
this._minDistance = maxDistance;
}
},
@ -290,10 +290,9 @@ var Tool = PaperScopeItem.extend(/** @lends Tool# */{
return false;
// Produce a new point on the way to point if point is further
// away than maxDistance
var maxDist = maxDistance != null ? maxDistance : 0;
if (maxDist != 0) {
if (distance > maxDist) {
point = this._point.add(vector.normalize(maxDist));
if (maxDistance != null && maxDistance != 0) {
if (distance > maxDistance) {
point = this._point.add(vector.normalize(maxDistance));
} else if (matchMaxDistance) {
return false;
}