mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00
apps updated
This commit is contained in:
@ -1,17 +1,18 @@
|
|||||||
var obj;
|
import view = require("ui/core/view");
|
||||||
|
import observable = require("data/observable");
|
||||||
export function loaded(args) {
|
import label = require("ui/label");
|
||||||
obj = args.object;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function butonTap(args) {
|
export function butonTap(args) {
|
||||||
if (obj.style.textDecoration === "underline") {
|
var btn = <view.View>args.object;
|
||||||
obj.style.textDecoration = "line-through";
|
var lbl = <label.Label>btn.parent.getViewById("Label1");
|
||||||
} else if (obj.style.textDecoration === "line-through") {
|
|
||||||
obj.style.textDecoration = "line-through underline";
|
if (lbl.style.textDecoration === "underline") {
|
||||||
} else if (obj.style.textDecoration === "line-through underline") {
|
lbl.style.textDecoration = "line-through";
|
||||||
obj.style.textDecoration = "none";
|
} else if (lbl.style.textDecoration === "line-through") {
|
||||||
} else if (obj.style.textDecoration === "none") {
|
lbl.style.textDecoration = "line-through underline";
|
||||||
obj.style.textDecoration = "underline";
|
} else if (lbl.style.textDecoration === "line-through underline") {
|
||||||
|
lbl.style.textDecoration = "none";
|
||||||
|
} else if (lbl.style.textDecoration === "none") {
|
||||||
|
lbl.style.textDecoration = "underline";
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,7 +2,7 @@
|
|||||||
<ScrollView>
|
<ScrollView>
|
||||||
<StackLayout>
|
<StackLayout>
|
||||||
<Button text="Change" tap="butonTap" />
|
<Button text="Change" tap="butonTap" />
|
||||||
<Label text="Text" style.textDecoration="underline" loaded="loaded"/>
|
<Label id="Label1" text="Text" style.textDecoration="underline" />
|
||||||
|
|
||||||
<Label text="Label" style="text-decoration:none" />
|
<Label text="Label" style="text-decoration:none" />
|
||||||
<Label text="Label" style="text-decoration:underline" />
|
<Label text="Label" style="text-decoration:underline" />
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
var obj;
|
import view = require("ui/core/view");
|
||||||
|
import observable = require("data/observable");
|
||||||
|
import label = require("ui/label");
|
||||||
|
|
||||||
export function loaded(args) {
|
export function butonTap(args: observable.EventData) {
|
||||||
obj = args.object;
|
var btn = <view.View>args.object;
|
||||||
}
|
var lbl = <label.Label>btn.parent.getViewById("Label1");
|
||||||
|
|
||||||
export function butonTap(args) {
|
if (lbl.style.whiteSpace === "normal") {
|
||||||
if (obj.style.whiteSpace === "normal") {
|
lbl.style.whiteSpace = "nowrap";
|
||||||
obj.style.whiteSpace = "nowrap";
|
} else if (lbl.style.whiteSpace === "nowrap") {
|
||||||
} else if (obj.style.whiteSpace === "nowrap") {
|
lbl.style.whiteSpace = "normal";
|
||||||
obj.style.whiteSpace = "normal";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,7 +2,7 @@
|
|||||||
<ScrollView>
|
<ScrollView>
|
||||||
<StackLayout width="50">
|
<StackLayout width="50">
|
||||||
<Button text="Change" tap="butonTap" />
|
<Button text="Change" tap="butonTap" />
|
||||||
<Label text="Text Text" style.whiteSpace="normal" loaded="loaded"/>
|
<Label id="Label1" text="Text Text" style.whiteSpace="normal" />
|
||||||
|
|
||||||
<Label text="Label Normal" style="white-space:normal" />
|
<Label text="Label Normal" style="white-space:normal" />
|
||||||
<Label text="Label Nowrap" style="white-space:nowrap" />
|
<Label text="Label Nowrap" style="white-space:nowrap" />
|
||||||
|
Reference in New Issue
Block a user