Simplify width calculation in RCTText

Summary:
getLayoutWidth is the same as right - left, and since we have right
and left, we can save a method call.

Reviewed By: sriramramani

Differential Revision: D3010697
This commit is contained in:
Ahmed El-Helw 2016-03-03 21:36:37 -08:00
parent 9498f22439
commit a541384621
1 changed files with 1 additions and 1 deletions

View File

@ -173,7 +173,7 @@ import com.facebook.react.uimanager.annotations.ReactProp;
mDrawCommand = new DrawTextLayout(new BoringLayout(
mText,
PAINT,
(int) getLayoutWidth(),
(int) (right - left),
mAlignment,
mSpacingMult,
mSpacingAdd,