textTransform, whiteSpace & textAlignment defaultValue is now “initia” (#3948)

removed enum namespaces
add valueConverter to clipToBounds
This commit is contained in:
Hristo Hristov
2017-04-06 09:50:37 +03:00
committed by GitHub
parent 2c74f93a44
commit f350f7191d
31 changed files with 368 additions and 644 deletions

View File

@@ -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";
}
}
}