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

Function buttonTap

apps/ui/src/css/line-height-page.ts:5–20  ·  view source on GitHub ↗
(args: EventData)

Source from the content-addressed store, hash-verified

3const values = [3, 7, 13];
4
5export function buttonTap(args: EventData) {
6 let page = (<TextBase>args.object).page;
7 let lbl = <TextBase>page.getViewById('label');
8 let btn = <TextBase>page.getViewById('button');
9 let tv = <TextBase>page.getViewById('textView');
10 let ft = <TextBase>page.getViewById('formattedText');
11
12 let index = values.indexOf(lbl.lineHeight);
13 let newIndex = (index + 1) % values.length;
14 let newValue = values[newIndex];
15
16 lbl.lineHeight = newValue;
17 btn.lineHeight = newValue;
18 tv.lineHeight = newValue;
19 ft.lineHeight = newValue;
20}

Callers

nothing calls this directly

Calls 1

indexOfMethod · 0.80

Tested by

no test coverage detected