MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / width

Function width

apps/automated/src/ui/layouts/layout-tests-helper.ts:26–28  ·  view source on GitHub ↗
(view: View)

Source from the content-addressed store, hash-verified

24}
25
26export function width(view: View): number {
27 return round(dipToDp(view.getActualSize().width));
28}
29
30export function paddingLeft(view: View): number {
31 return Length.toDevicePixels(view.style.paddingLeft, 0) + Length.toDevicePixels(view.parent.style.paddingLeft, 0) + (<View>view.parent).getSafeAreaInsets().left;

Calls 1

roundFunction · 0.50

Tested by

no test coverage detected