MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / onTap3

Function onTap3

apps/ui/src/perf/properties/main-page.ts:23–77  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

21}
22
23export function onTap3(args) {
24 let btn = <Button>args.object;
25 const p = btn.page.getViewById<StackLayout>('placeholder');
26 btn.text = 'Start tests...';
27
28 let result = btn.page.getViewById<TextView>('result');
29
30 result.text = '';
31
32 function track(line: string) {
33 console.log(line);
34 result.fontSize = 10;
35 result.text += line + '\n';
36 }
37
38 let text = 'Count';
39 c.forEach((e) => {
40 text += `\t${e}`;
41 });
42 track(text);
43
44 let tasks = [
45 () => track(tests.setBackgroundColor(c)),
46 () => track(tests.setBackgroundColor(c, getStack(p))),
47 () => track(tests.setBindingContext(c)),
48 () => track(tests.setBindingContext(c, getStack(p))),
49 () => track(tests.setBindingContextWithParents(c, getStack(p))),
50 () => track(tests.setBindingContextWithParentsBound(c, getStack(p))),
51 () => track(tests.setBorderWidths(c)),
52 () => track(tests.setBorderWidths(c, getStack(p))),
53 () => track(tests.setFontSize(c)),
54 () => track(tests.setFontSize(c, getStack(p))),
55 () => track(tests.setFontSizeWithParents(c, getStack(p))),
56 () => track(tests.setFontWeight(c)),
57 () => track(tests.setFontWeight(c, getStack(p))),
58 () => track(tests.setFontWeightWithParents(c, getStack(p))),
59 () => track(tests.setColor(c)),
60 () => track(tests.setColor(c, getStack(p))),
61 () => track(tests.setColorWithParents(c, getStack(p))),
62 () => track(tests.setText(c)),
63 () => track(tests.setText(c, getStack(p))),
64 () => track(tests.addRemove(c, getStack(p))),
65 () => track('Complete!'),
66 ];
67 let i = 0;
68 runner = setInterval(nextTask, 1);
69 function nextTask() {
70 if (i < tasks.length) {
71 tasks[i]();
72 i++;
73 } else {
74 clearInterval(runner);
75 }
76 }
77}

Callers

nothing calls this directly

Calls 5

trackFunction · 0.85
getStackFunction · 0.85
forEachMethod · 0.80
setColorMethod · 0.80
setIntervalFunction · 0.50

Tested by

no test coverage detected