mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Gradient#equals: also check gradient type.
This commit is contained in:
parent
d8b73f3671
commit
46b1311260
1 changed files with 2 additions and 0 deletions
|
@ -49,6 +49,8 @@ var Gradient = this.Gradient = Base.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
equals: function(gradient) {
|
equals: function(gradient) {
|
||||||
|
if (gradient.type != this.type)
|
||||||
|
return false;
|
||||||
if (this._stops.length == gradient._stops.length) {
|
if (this._stops.length == gradient._stops.length) {
|
||||||
for (var i = 0, l = this._stops.length; i < l; i++) {
|
for (var i = 0, l = this._stops.length; i < l; i++) {
|
||||||
if (!this._stops[i].equals(gradient._stops[i]))
|
if (!this._stops[i].equals(gradient._stops[i]))
|
||||||
|
|
Loading…
Reference in a new issue