Simplify GradientStop#equals().

This commit is contained in:
Jürg Lehni 2011-05-18 09:40:03 +01:00
parent 8b2709f5d8
commit 57eabed874

View file

@ -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;
}
});