Text add fontStype property
This commit is contained in:
2
doric-js/lib/src/util/gravity.d.ts
vendored
2
doric-js/lib/src/util/gravity.d.ts
vendored
@@ -18,6 +18,8 @@ export declare class Gravity implements Modeling {
|
||||
toModel(): number;
|
||||
private static origin;
|
||||
static Center: Gravity;
|
||||
static CenterX: Gravity;
|
||||
static CenterY: Gravity;
|
||||
static Left: Gravity;
|
||||
static Right: Gravity;
|
||||
static Top: Gravity;
|
||||
|
@@ -62,6 +62,8 @@ export class Gravity {
|
||||
}
|
||||
Gravity.origin = new Gravity;
|
||||
Gravity.Center = Gravity.origin.center();
|
||||
Gravity.CenterX = Gravity.origin.centerX();
|
||||
Gravity.CenterY = Gravity.origin.centerY();
|
||||
Gravity.Left = Gravity.origin.left();
|
||||
Gravity.Right = Gravity.origin.right();
|
||||
Gravity.Top = Gravity.origin.top();
|
||||
|
2
doric-js/lib/src/widget/text.d.ts
vendored
2
doric-js/lib/src/widget/text.d.ts
vendored
@@ -7,6 +7,7 @@ export interface IText extends IView {
|
||||
textSize?: number;
|
||||
maxLines?: number;
|
||||
textAlignment?: Gravity;
|
||||
fontStyle?: "normal" | "bold" | "italic" | "bold_italic";
|
||||
}
|
||||
export declare class Text extends View implements IText {
|
||||
text?: string;
|
||||
@@ -14,5 +15,6 @@ export declare class Text extends View implements IText {
|
||||
textSize?: number;
|
||||
maxLines?: number;
|
||||
textAlignment?: Gravity;
|
||||
fontStyle?: "normal" | "bold" | "italic" | "bold_italic";
|
||||
}
|
||||
export declare function text(config: IText): Text;
|
||||
|
@@ -48,6 +48,10 @@ __decorate([
|
||||
Property,
|
||||
__metadata("design:type", Gravity)
|
||||
], Text.prototype, "textAlignment", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", String)
|
||||
], Text.prototype, "fontStyle", void 0);
|
||||
export function text(config) {
|
||||
const ret = new Text;
|
||||
ret.layoutConfig = layoutConfig().fit();
|
||||
|
Reference in New Issue
Block a user