example updated

This commit is contained in:
Vladimir Enchev
2015-11-06 16:21:29 +02:00
parent ef26a0f59c
commit abe4614735
3 changed files with 23 additions and 2 deletions

View File

@ -0,0 +1,17 @@
var obj;
export function loaded(args) {
obj = args.object;
}
export function butonTap(args) {
if (obj.style.textDecoration === "underline") {
obj.style.textDecoration = "line-through";
} else if (obj.style.textDecoration === "line-through") {
obj.style.textDecoration = "line-through underline";
} else if (obj.style.textDecoration === "line-through underline") {
obj.style.textDecoration = "none";
} else if (obj.style.textDecoration === "none") {
obj.style.textDecoration = "underline";
}
}

View File

@ -1,6 +1,9 @@
<Page>
<Page >
<ScrollView>
<StackLayout>
<Button text="Change" tap="butonTap" />
<Label text="Text" style.textDecoration="underline" loaded="loaded"/>
<Label text="Label" style="text-decoration:none" />
<Label text="Label" style="text-decoration:underline" />
<Label text="Label" style="text-decoration:line-through" />