mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Clean up code references to GradientColor.
This commit is contained in:
parent
bf21e32082
commit
da7b32a18e
3 changed files with 4 additions and 4 deletions
|
@ -47,7 +47,7 @@ var GradientStop = this.GradientStop = Base.extend(/** @lends GradientStop# */{
|
|||
|
||||
// TODO: Do we really need to also clone the color here?
|
||||
/**
|
||||
* @return {GradientColor} a copy of the gradient-stop
|
||||
* @return {GradientStop} a copy of the gradient-stop
|
||||
*/
|
||||
clone: function() {
|
||||
return new GradientStop(this._color.clone(), this._rampPoint);
|
||||
|
|
|
@ -153,10 +153,10 @@ new function() {
|
|||
origin = getPoint(node, 'x1', 'y1');
|
||||
destination = getPoint(node, 'x2', 'y2');
|
||||
}
|
||||
// We don't return the GradientColor, since we only need a reference to
|
||||
// it in definitions, which is created in applyAttributes()
|
||||
applyAttributes(
|
||||
new Color(gradient, origin, destination, highlight), node);
|
||||
// We don't return the gradient, since we only need a reference to it in
|
||||
// definitions, which is created in applyAttributes()
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ test('Path#clone()', function() {
|
|||
cloneAndCompare(path);
|
||||
});
|
||||
|
||||
test('Path#clone() with GradientColor', function() {
|
||||
test('Path#clone() with gradient Color', function() {
|
||||
var colors = ['red', 'green', 'black'];
|
||||
var gradient = new Gradient(colors, true);
|
||||
var color = new Color(gradient, [0, 0], [20, 20], [10, 10]);
|
||||
|
|
Loading…
Reference in a new issue