mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Gradient: rename midPoint to rampPoint.
This commit is contained in:
parent
277cf541de
commit
5f05c85b42
1 changed files with 5 additions and 5 deletions
|
@ -38,18 +38,18 @@ var Gradient = this.Gradient = Base.extend({
|
||||||
'Gradient stop list needs to contain at least two stops.');
|
'Gradient stop list needs to contain at least two stops.');
|
||||||
if(!(stops[0] instanceof GradientStop)) {
|
if(!(stops[0] instanceof GradientStop)) {
|
||||||
for(var i = 0, l = stops.length; i < l; i++) {
|
for(var i = 0, l = stops.length; i < l; i++) {
|
||||||
var midPoint;
|
var rampPoint;
|
||||||
var stop = stops[i];
|
var stop = stops[i];
|
||||||
// If it is an array, the second argument is the midPoint:
|
// If it is an array, the second argument is the rampPoint:
|
||||||
if(stop.length) {
|
if(stop.length) {
|
||||||
midPoint = stop[1];
|
rampPoint = stop[1];
|
||||||
stop = stop[0];
|
stop = stop[0];
|
||||||
} else {
|
} else {
|
||||||
// Otherwise stops is an array of colors, and we need to
|
// Otherwise stops is an array of colors, and we need to
|
||||||
// calculate the midPoint:
|
// calculate the midPoint:
|
||||||
midPoint = i / (l - 1);
|
rampPoint = i / (l - 1);
|
||||||
}
|
}
|
||||||
stops[i] = new GradientStop(stop, midPoint);
|
stops[i] = new GradientStop(stop, rampPoint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this._stops = stops;
|
this._stops = stops;
|
||||||
|
|
Loading…
Reference in a new issue