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

Function setBackgroundColor

apps/ui/src/perf/properties/tests.ts:47–67  ·  view source on GitHub ↗
(counts: Array<number>, parent?: LayoutBase)

Source from the content-addressed store, hash-verified

45}
46
47export function setBackgroundColor(counts: Array<number>, parent?: LayoutBase): string {
48 let result = `setBackgroundColor ${parent ? 'with nativeView' : ''}`;
49 counts.forEach((count) => {
50 if (parent && count > 10000) {
51 result += setResultTime(noValue);
52
53 return;
54 }
55
56 const lbl = setup(parent);
57 const style = lbl.style;
58 const time = executeTest(() => {
59 for (let i = 0; i < count; i++) {
60 style.backgroundColor = <any>colors[i % 2];
61 }
62 });
63 result += setResultTime(time);
64 });
65
66 return result;
67}
68
69const borders = [1, 2, 3];
70export function setBorderWidths(counts: Array<number>, parent?: LayoutBase): string {

Callers

nothing calls this directly

Calls 4

setResultTimeFunction · 0.85
executeTestFunction · 0.85
forEachMethod · 0.80
setupFunction · 0.70

Tested by

no test coverage detected