mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Remove unnecessary Color#clone() since it's doing the same as Base#clone() now.
This commit is contained in:
parent
593e0d8d7f
commit
91a5bb9f88
2 changed files with 9 additions and 8 deletions
|
@ -651,13 +651,6 @@ var Color = Base.extend(new function() {
|
||||||
this._owner._changed(/*#=*/ Change.STYLE);
|
this._owner._changed(/*#=*/ Change.STYLE);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* @return {Color} a copy of the color object
|
|
||||||
*/
|
|
||||||
clone: function() {
|
|
||||||
return new Color(this);
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {Number[]} the converted components as an array.
|
* @return {Number[]} the converted components as an array.
|
||||||
*/
|
*/
|
||||||
|
@ -760,6 +753,14 @@ var Color = Base.extend(new function() {
|
||||||
|| false;
|
|| false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Color#clone
|
||||||
|
*
|
||||||
|
* Returns a copy of the color object.
|
||||||
|
*
|
||||||
|
* @return {Color} a copy of the color object
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@grouptitle String Representations}
|
* {@grouptitle String Representations}
|
||||||
* @return {String} a string representation of the color
|
* @return {String} a string representation of the color
|
||||||
|
|
|
@ -124,7 +124,7 @@ var Gradient = Base.extend(/** @lends Gradient# */{
|
||||||
var stops = [];
|
var stops = [];
|
||||||
for (var i = 0, l = this._stops.length; i < l; i++)
|
for (var i = 0, l = this._stops.length; i < l; i++)
|
||||||
stops[i] = this._stops[i].clone();
|
stops[i] = this._stops[i].clone();
|
||||||
return new this.constructor(stops);
|
return new Gradient(stops);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue