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

Function setupParents

apps/ui/src/perf/properties/tests.ts:266–283  ·  view source on GitHub ↗
(parent: LayoutBase, bindToContext: boolean = false)

Source from the content-addressed store, hash-verified

264}
265
266function setupParents(parent: LayoutBase, bindToContext: boolean = false): void {
267 for (let i = 0; i < 3; i++) {
268 let stack = new StackLayout();
269 parent.addChild(stack);
270 for (let j = 0; j < 3; j++) {
271 let innerStack = new StackLayout();
272 stack.addChild(innerStack);
273 for (let k = 0; k < 3; k++) {
274 const lbl = new Label();
275 if (bindToContext) {
276 lbl.bind({ sourceProperty: '$value', targetProperty: 'text' });
277 }
278
279 innerStack.addChild(lbl);
280 }
281 }
282 }
283}
284
285function setup(parent?: LayoutBase): Label {
286 let lbl = new Label();

Callers 5

setColorWithParentsFunction · 0.85
setFontSizeWithParentsFunction · 0.85
setFontWeightWithParentsFunction · 0.85

Calls 2

bindMethod · 0.80
addChildMethod · 0.45

Tested by

no test coverage detected