mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Simplify GradientStop#equals().
This commit is contained in:
parent
8b2709f5d8
commit
57eabed874
1 changed files with 3 additions and 7 deletions
|
@ -38,14 +38,10 @@ var GradientStop = this.GradientStop = Base.extend({
|
|||
setColor: function(color) {
|
||||
this._color = Color.read(arguments);
|
||||
},
|
||||
|
||||
|
||||
equals: function(stop) {
|
||||
if (stop == this) {
|
||||
return true;
|
||||
} else if (stop instanceof GradientStop) {
|
||||
return this._color.equals(stop._color)
|
||||
return stop == this || stop instanceof GradientStop
|
||||
&& this._color.equals(stop._color)
|
||||
&& rampPoint == stop._rampPoint;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue