mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-05 22:56:11 +00:00
fix: don't set zero dimensions on RNSVGGroup (#2612)
# Summary Fixes #2610 It's more of a hack than the best fix for that; however, it's a regression that we should address. ## Test Plan Test case provided in #2610
This commit is contained in:
@@ -8,14 +8,18 @@ RNSVGLayoutableShadowNode::RNSVGLayoutableShadowNode(
|
||||
const ShadowNodeFamily::Shared &family,
|
||||
ShadowNodeTraits traits)
|
||||
: YogaLayoutableShadowNode(fragment, family, traits) {
|
||||
setZeroDimensions();
|
||||
if (std::strcmp(this->getComponentName(), "RNSVGGroup") != 0) {
|
||||
setZeroDimensions();
|
||||
}
|
||||
}
|
||||
|
||||
RNSVGLayoutableShadowNode::RNSVGLayoutableShadowNode(
|
||||
const ShadowNode &sourceShadowNode,
|
||||
const ShadowNodeFragment &fragment)
|
||||
: YogaLayoutableShadowNode(sourceShadowNode, fragment) {
|
||||
setZeroDimensions();
|
||||
if (std::strcmp(this->getComponentName(), "RNSVGGroup") != 0) {
|
||||
setZeroDimensions();
|
||||
}
|
||||
}
|
||||
|
||||
void RNSVGLayoutableShadowNode::setZeroDimensions() {
|
||||
|
||||
Reference in New Issue
Block a user