mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Simplify GradientColor#equals().
This commit is contained in:
parent
57eabed874
commit
88332d763d
1 changed files with 4 additions and 6 deletions
|
@ -92,12 +92,10 @@ var GradientColor = this.GradientColor = Color.extend({
|
|||
* @return true if the GrayColor is the same, false otherwise.
|
||||
*/
|
||||
equals: function(color) {
|
||||
if (color && color._colorType === this._colorType) {
|
||||
return this.gradient.equals(color.gradient)
|
||||
&& this._origin.equals(color._origin)
|
||||
&& this._destination.equals(color._destination);
|
||||
}
|
||||
return false;
|
||||
return color == this || color && color._colorType === this._colorType
|
||||
&& this.gradient.equals(color.gradient)
|
||||
&& this._origin.equals(color._origin)
|
||||
&& this._destination.equals(color._destination);
|
||||
},
|
||||
|
||||
transform: function(matrix) {
|
||||
|
|
Loading…
Reference in a new issue