[ios] Fix strokeDashArray regression

This commit is contained in:
Mikael Sand
2018-10-20 02:28:44 +03:00
parent 75204047c9
commit e576813329
+3 -2
View File
@@ -327,7 +327,7 @@ UInt32 saturate(double value) {
NSArray<RNSVGLength *>* strokeDasharray = self.strokeDasharray;
if (strokeDasharray.count) {
RNSVGCGFloatArray dash = self.strokeDasharrayData;
RNSVGCGFloatArray dash = _strokeDasharrayData;
if (strokeDasharray != _sourceStrokeDashArray) {
_sourceStrokeDashArray = strokeDasharray;
if (dash.array) {
@@ -340,9 +340,10 @@ UInt32 saturate(double value) {
if (count) {
dash.array = malloc(sizeof(CGFloat) * count);
for (NSUInteger i = 0; i < count; i++) {
dash.array[i] = [self relativeOnOther:strokeDasharray[i]];
dash.array[i] = (CGFloat)[self relativeOnOther:strokeDasharray[i]];
}
}
_strokeDasharrayData = dash;
}
CGContextSetLineDash(context, self.strokeDashoffset, dash.array, dash.count);
}