MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / tabItemFallbackFrame

Function tabItemFallbackFrame

packages/nativescript-inspector/src/index.ts:1763–1775  ·  view source on GitHub ↗
(
  tabBarFrame: JSONObject,
  count: number,
  index: number,
)

Source from the content-addressed store, hash-verified

1761}
1762
1763function tabItemFallbackFrame(
1764 tabBarFrame: JSONObject,
1765 count: number,
1766 index: number,
1767): JSONObject {
1768 const width = count > 0 ? rectNumber(tabBarFrame, "width") / count : 0;
1769 return {
1770 x: rectNumber(tabBarFrame, "x") + width * index,
1771 y: rectNumber(tabBarFrame, "y"),
1772 width,
1773 height: rectNumber(tabBarFrame, "height"),
1774 };
1775}
1776
1777function isNativeScriptVisible(view: any): boolean {
1778 return read(view, "visibility") !== "collapse";

Callers 1

Calls 1

rectNumberFunction · 0.85

Tested by

no test coverage detected