fix #33
This commit is contained in:
Horcrux
2016-05-13 11:15:05 +08:00
parent 080fcb86fd
commit ec67d4dae8
3 changed files with 3 additions and 4 deletions

View File

@@ -1,5 +1,4 @@
import {PropTypes} from 'react';
import stopsOpacity from '../lib/stopsOpacity';
import {numberProp} from '../lib/props';
import Gradient from './Gradient';
@@ -7,7 +6,7 @@ import {LINEAR_GRADIENT} from '../lib/extract/extractBrush';
import insertColorStopsIntoArray from '../lib/insertProcessor';
function LinearGradientGenerator(stops, x1, y1, x2, y2) {
var brushData = [LINEAR_GRADIENT, x1, y1, x2, y2];
let brushData = [LINEAR_GRADIENT, ...[x1, y1, x2, y2].map(prop => prop.toString())];
insertColorStopsIntoArray(stops, brushData, 5);
this._brush = brushData;
}