diff --git a/android/src/main/java/com/horcrux/svg/SvgView.java b/android/src/main/java/com/horcrux/svg/SvgView.java index 6735fb2d..90d855db 100644 --- a/android/src/main/java/com/horcrux/svg/SvgView.java +++ b/android/src/main/java/com/horcrux/svg/SvgView.java @@ -221,8 +221,8 @@ public class SvgView extends ReactViewGroup implements ReactCompoundView, ReactC mRendered = true; float width = getWidth(); float height = getHeight(); - boolean early = Float.isNaN(width) || Float.isNaN(height) || width * height == 0 || (Math.log10(width) + Math.log10(height) > 42); - if (early || width == 0 || height == 0) { + boolean invalid = Float.isNaN(width) || Float.isNaN(height) || width < 1 || height < 1 || (Math.log10(width) + Math.log10(height) > 42); + if (invalid) { return null; } Bitmap bitmap = Bitmap.createBitmap( diff --git a/ios/Elements/RNSVGGroup.m b/ios/Elements/RNSVGGroup.m index 803a209a..3730079e 100644 --- a/ios/Elements/RNSVGGroup.m +++ b/ios/Elements/RNSVGGroup.m @@ -169,7 +169,7 @@ NSPredicate *const anyActive = [NSPredicate predicateWithFormat:@"active == TRUE"]; NSArray *const filtered = [self.subviews filteredArrayUsingPredicate:anyActive]; if ([filtered count] != 0) { - return [filtered.firstObject hitTest:transformed withEvent:event]; + return [filtered.lastObject hitTest:transformed withEvent:event]; } } diff --git a/ios/ViewManagers/RNSVGDefsManager.m b/ios/ViewManagers/RNSVGDefsManager.m index d6eccd83..8c1e86ad 100644 --- a/ios/ViewManagers/RNSVGDefsManager.m +++ b/ios/ViewManagers/RNSVGDefsManager.m @@ -23,9 +23,4 @@ RCT_EXPORT_MODULE() return [self node]; } -- (RCTShadowView *)shadowView -{ - return nil; -} - @end