mirror of
https://github.com/status-im/react-native.git
synced 2025-01-19 05:51:01 +00:00
Fix incorrect size issue with inline image text
Reviewed By: andreicoman11 Differential Revision: D2834175 fb-gh-sync-id: 827d37e0128eb07f2e009479269b63c3a3549315
This commit is contained in:
parent
18437093f2
commit
2a02621e74
@ -161,8 +161,8 @@ public class ReactTextShadowNode extends LayoutShadowNode {
|
|||||||
int start = sb.length();
|
int start = sb.length();
|
||||||
// Create our own internal ImageSpan which will allow us to correctly layout the Image
|
// Create our own internal ImageSpan which will allow us to correctly layout the Image
|
||||||
Resources resources = node.getThemedContext().getResources();
|
Resources resources = node.getThemedContext().getResources();
|
||||||
int height = (int) PixelUtil.toDIPFromPixel(node.getStyleHeight());
|
int height = (int) Math.ceil(node.getStyleHeight());
|
||||||
int width = (int) PixelUtil.toDIPFromPixel(node.getStyleWidth());
|
int width = (int) Math.ceil(node.getStyleWidth());
|
||||||
TextInlineImageSpan imageSpan = new TextInlineImageSpan(
|
TextInlineImageSpan imageSpan = new TextInlineImageSpan(
|
||||||
resources,
|
resources,
|
||||||
height,
|
height,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user