Merge pull request #235 from sjmueller/master
Rename start & end properties to fix conflict with RN 51
This commit is contained in:
commit
9e0e1785cf
|
@ -24,14 +24,14 @@
|
|||
self.gradientLayer.colors = colors;
|
||||
}
|
||||
|
||||
- (void)setStart:(CGPoint)start
|
||||
- (void)setStartPoint:(CGPoint)startPoint
|
||||
{
|
||||
self.gradientLayer.startPoint = start;
|
||||
self.gradientLayer.startPoint = startPoint;
|
||||
}
|
||||
|
||||
- (void)setEnd:(CGPoint)end
|
||||
- (void)setEndPoint:(CGPoint)endPoint
|
||||
{
|
||||
self.gradientLayer.endPoint = end;
|
||||
self.gradientLayer.endPoint = endPoint;
|
||||
}
|
||||
|
||||
- (void)setLocations:(NSArray *)locations
|
||||
|
|
|
@ -19,8 +19,8 @@ RCT_EXPORT_MODULE();
|
|||
}
|
||||
|
||||
RCT_EXPORT_VIEW_PROPERTY(colors, NSArray);
|
||||
RCT_EXPORT_VIEW_PROPERTY(start, CGPoint);
|
||||
RCT_EXPORT_VIEW_PROPERTY(end, CGPoint);
|
||||
RCT_EXPORT_VIEW_PROPERTY(startPoint, CGPoint);
|
||||
RCT_EXPORT_VIEW_PROPERTY(endPoint, CGPoint);
|
||||
RCT_EXPORT_VIEW_PROPERTY(locations, NSArray);
|
||||
|
||||
@end
|
||||
|
|
|
@ -13,8 +13,8 @@ public class LinearGradientManager extends SimpleViewManager<LinearGradientView>
|
|||
public static final String REACT_CLASS = "BVLinearGradient";
|
||||
public static final String PROP_COLORS = "colors";
|
||||
public static final String PROP_LOCATIONS = "locations";
|
||||
public static final String PROP_START_POS = "start";
|
||||
public static final String PROP_END_POS = "end";
|
||||
public static final String PROP_START_POS = "startPoint";
|
||||
public static final String PROP_END_POS = "endPoint";
|
||||
public static final String PROP_BORDER_RADII = "borderRadii";
|
||||
|
||||
@Override
|
||||
|
|
|
@ -89,8 +89,8 @@ export default class LinearGradient extends Component {
|
|||
<NativeLinearGradient
|
||||
style={{position: 'absolute', top: 0, left: 0, bottom: 0, right: 0}}
|
||||
colors={colors.map(processColor)}
|
||||
start={convertPoint('start', start)}
|
||||
end={convertPoint('end', end)}
|
||||
startPoint={convertPoint('start', start)}
|
||||
endPoint={convertPoint('end', end)}
|
||||
locations={locations ? locations.slice(0, colors.length) : null}
|
||||
borderRadii={borderRadiiPerCorner}
|
||||
/>
|
||||
|
|
|
@ -72,8 +72,8 @@ export default class LinearGradient extends Component {
|
|||
<NativeLinearGradient
|
||||
ref={(component) => { this.gradientRef = component; }}
|
||||
{...otherProps}
|
||||
start={convertPoint('start', start)}
|
||||
end={convertPoint('end', end)}
|
||||
startPoint={convertPoint('start', start)}
|
||||
endPoint={convertPoint('end', end)}
|
||||
colors={colors.map(processColor)}
|
||||
locations={locations ? locations.slice(0, colors.length) : null}
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue