mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-05 07:59:28 +00:00
Improved anchored text chunk logic #570
This commit is contained in:
@@ -221,7 +221,7 @@ class TextView extends GroupView {
|
||||
TextView node = this;
|
||||
ViewParent parent = this.getParent();
|
||||
for (int i = font.size() - 1; i >= 0; i--) {
|
||||
if (!(parent instanceof TextView) || font.get(i).textAnchor == TextProperties.TextAnchor.start) {
|
||||
if (!(parent instanceof TextView) || font.get(i).textAnchor == TextProperties.TextAnchor.start || node.mPositionX != null) {
|
||||
return node;
|
||||
}
|
||||
node = (TextView) parent;
|
||||
|
||||
@@ -264,7 +264,8 @@
|
||||
for (NSInteger i = [font count] - 1; i >= 0; i--) {
|
||||
RNSVGFontData* fontData = [font objectAtIndex:i];
|
||||
if (![parent isKindOfClass:[RNSVGText class]] ||
|
||||
fontData->textAnchor == RNSVGTextAnchorStart) {
|
||||
fontData->textAnchor == RNSVGTextAnchorStart ||
|
||||
node.positionX != nil) {
|
||||
return node;
|
||||
}
|
||||
node = (RNSVGText*) parent;
|
||||
|
||||
Reference in New Issue
Block a user