mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
textTransform, whiteSpace & textAlignment defaultValue is now “initia” (#3948)
removed enum namespaces add valueConverter to clipToBounds
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { EventData, TextBase, TextDecoration } from "tns-core-modules/ui/text-base";
|
||||
|
||||
const possibleValues = [
|
||||
TextDecoration.NONE,
|
||||
TextDecoration.UNDERLINE,
|
||||
TextDecoration.LINE_THROUGH,
|
||||
TextDecoration.UNDERLINE_LINE_THROUGH
|
||||
"none",
|
||||
"underline",
|
||||
"line-through",
|
||||
"underline line-through"
|
||||
];
|
||||
|
||||
export function butonTap(args: EventData) {
|
||||
@@ -13,19 +13,19 @@ export function butonTap(args: EventData) {
|
||||
let btn = <TextBase>page.getViewById("Button");
|
||||
let textField = <TextBase>page.getViewById("TextField");
|
||||
let textView = <TextBase>page.getViewById("TextView");
|
||||
|
||||
|
||||
let currentIndex = possibleValues.indexOf(lbl.textDecoration);
|
||||
let newIndex = (currentIndex + 1) % possibleValues.length;
|
||||
let newValue = <TextDecoration>possibleValues[newIndex];
|
||||
|
||||
|
||||
lbl.textDecoration = newValue;
|
||||
btn.textDecoration = newValue;
|
||||
textField.textDecoration = newValue;
|
||||
textView.textDecoration = newValue;
|
||||
|
||||
if(lbl.text === "Change text") {
|
||||
if (lbl.text === "Change text") {
|
||||
lbl.text = btn.text = textField.text = textView.text = "Text changed";
|
||||
} else {
|
||||
lbl.text = btn.text = textField.text = textView.text = "Change text";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user