mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -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);
|
||||
},
|
||||
|
||||
/**
|
||||
* @return {Color} a copy of the color object
|
||||
*/
|
||||
clone: function() {
|
||||
return new Color(this);
|
||||
},
|
||||
|
||||
/**
|
||||
* @return {Number[]} the converted components as an array.
|
||||
*/
|
||||
|
@ -760,6 +753,14 @@ var Color = Base.extend(new function() {
|
|||
|| false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @name Color#clone
|
||||
*
|
||||
* Returns a copy of the color object.
|
||||
*
|
||||
* @return {Color} a copy of the color object
|
||||
*/
|
||||
|
||||
/**
|
||||
* {@grouptitle String Representations}
|
||||
* @return {String} a string representation of the color
|
||||
|
|
|
@ -124,7 +124,7 @@ var Gradient = Base.extend(/** @lends Gradient# */{
|
|||
var stops = [];
|
||||
for (var i = 0, l = this._stops.length; i < l; i++)
|
||||
stops[i] = this._stops[i].clone();
|
||||
return new this.constructor(stops);
|
||||
return new Gradient(stops);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue