Remove unnecessary Color#clone() since it's doing the same as Base#clone() now.

This commit is contained in:
Jürg Lehni 2013-11-28 22:24:29 +01:00
parent 593e0d8d7f
commit 91a5bb9f88
2 changed files with 9 additions and 8 deletions

View file

@ -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

View file

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