Commit 6643b286 authored by Qiu Xiang's avatar Qiu Xiang

调整命名 dottedLine => dashed

parent 2ee92ef8
...@@ -43,7 +43,7 @@ class AMapPolyline(context: ThemedReactContext) : ReactViewGroup(context) { ...@@ -43,7 +43,7 @@ class AMapPolyline(context: ThemedReactContext) : ReactViewGroup(context) {
polyline?.isGeodesic = value polyline?.isGeodesic = value
} }
var dottedLine: Boolean = false var dashed: Boolean = false
set(value) { set(value) {
field = value field = value
polyline?.isDottedLine = value polyline?.isDottedLine = value
...@@ -74,7 +74,7 @@ class AMapPolyline(context: ThemedReactContext) : ReactViewGroup(context) { ...@@ -74,7 +74,7 @@ class AMapPolyline(context: ThemedReactContext) : ReactViewGroup(context) {
.width(width) .width(width)
.useGradient(gradient) .useGradient(gradient)
.geodesic(geodesic) .geodesic(geodesic)
.setDottedLine(dottedLine) .setDottedLine(dashed)
.transparency(opacity) .transparency(opacity)
.zIndex(zIndex)) .zIndex(zIndex))
} }
......
...@@ -54,9 +54,9 @@ internal class AMapPolylineManager : ViewGroupManager<AMapPolyline>() { ...@@ -54,9 +54,9 @@ internal class AMapPolylineManager : ViewGroupManager<AMapPolyline>() {
polyline.geodesic = geodesic polyline.geodesic = geodesic
} }
@ReactProp(name = "dottedLine") @ReactProp(name = "dashed")
fun setDottedLine(polyline: AMapPolyline, dottedLine: Boolean) { fun setDashed(polyline: AMapPolyline, dashed: Boolean) {
polyline.dottedLine = dottedLine polyline.dashed = dashed
} }
@ReactProp(name = "gradient") @ReactProp(name = "gradient")
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
_renderer.strokeColor = color; _renderer.strokeColor = color;
} }
- (void)setDottedLine:(BOOL)dashed { - (void)setDashed:(BOOL)dashed {
_dashed = dashed; _dashed = dashed;
_renderer.lineDash = dashed; _renderer.lineDash = dashed;
} }
......
...@@ -19,6 +19,6 @@ RCT_EXPORT_MODULE() ...@@ -19,6 +19,6 @@ RCT_EXPORT_MODULE()
RCT_EXPORT_VIEW_PROPERTY(coordinates, CoordinateArray) RCT_EXPORT_VIEW_PROPERTY(coordinates, CoordinateArray)
RCT_EXPORT_VIEW_PROPERTY(width, CGFloat) RCT_EXPORT_VIEW_PROPERTY(width, CGFloat)
RCT_EXPORT_VIEW_PROPERTY(color, UIColor) RCT_EXPORT_VIEW_PROPERTY(color, UIColor)
RCT_EXPORT_VIEW_PROPERTY(dottedLine, BOOL) RCT_EXPORT_VIEW_PROPERTY(dashed, BOOL)
@end @end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment