mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-05 07:59:28 +00:00
@@ -70,6 +70,11 @@ class TSpanView extends TextView {
|
||||
super.invalidate();
|
||||
}
|
||||
|
||||
void clearCache() {
|
||||
mCachedPath = null;
|
||||
super.clearCache();
|
||||
}
|
||||
|
||||
@Override
|
||||
void draw(Canvas canvas, Paint paint, float opacity) {
|
||||
if (mContent != null) {
|
||||
|
||||
@@ -51,7 +51,7 @@ class TextView extends GroupView {
|
||||
return;
|
||||
}
|
||||
super.invalidate();
|
||||
clearChildCache();
|
||||
getTextContainer().clearChildCache();
|
||||
}
|
||||
|
||||
void clearCache() {
|
||||
@@ -246,4 +246,13 @@ class TextView extends GroupView {
|
||||
return advance;
|
||||
}
|
||||
|
||||
TextView getTextContainer() {
|
||||
TextView node = this;
|
||||
ViewParent parent = this.getParent();
|
||||
while (parent instanceof TextView) {
|
||||
node = (TextView) parent;
|
||||
parent = node.getParent();
|
||||
}
|
||||
return node;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user