mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
* Remove Bindable. Fix Observable & ObservableArray tests Fix formattedString text Change implementation of Span, FormattedString & TextBase properties valueChange called before native setter * revetred formattedString tests asserts - formattedText update text property again properties - when getting value we now use always property name instead of key (using key could return undefined for property that is set to its default value) updated fontSize & fontInternal properties on all controls fix font properties so that fontInternal is reset if the new font is the same as Font.default * fix tslint errors
55 lines
1.4 KiB
TypeScript
55 lines
1.4 KiB
TypeScript
declare module "text/span" {
|
|
import { Color } from "color";
|
|
import { ViewBase } from "ui/core/view-base";
|
|
import { FontStyle, FontWeight } from "ui/styling/font";
|
|
import { TextDecoration } from "ui/text-base";
|
|
|
|
/**
|
|
* A class used to create a single part of formatted string with a common text properties.
|
|
*/
|
|
class Span extends ViewBase {
|
|
/**
|
|
* Gets or sets the font family of the span.
|
|
*/
|
|
public fontFamily: string;
|
|
|
|
/**
|
|
* Gets or sets the font size of the span.
|
|
*/
|
|
public fontSize: number;
|
|
|
|
/**
|
|
* Gets or sets the font style of the span.
|
|
*/
|
|
public fontStyle: FontStyle;
|
|
|
|
/**
|
|
* Gets or sets the font weight of the span.
|
|
*/
|
|
public fontWeight: FontWeight;
|
|
|
|
/**
|
|
* Gets or sets text decorations for the span.
|
|
*/
|
|
public textDecoration: TextDecoration;
|
|
|
|
/**
|
|
* Gets or sets the font foreground color of the span.
|
|
*/
|
|
public color: Color;
|
|
|
|
/**
|
|
* Gets or sets the font background color of the span.
|
|
*/
|
|
public backgroundColor: Color;
|
|
|
|
/**
|
|
* Gets or sets the text for the span.
|
|
*/
|
|
public text: string;
|
|
|
|
//@private
|
|
_setTextInternal(value: string): void;
|
|
//@endprivate
|
|
}
|
|
} |