layout.d.ts: add rotation / l.r
parent
557b426b63
commit
9c72a8210d
|
|
@ -88,6 +88,13 @@ declare module Layout {
|
||||||
|
|
||||||
type Align = -1 | 0 | 1;
|
type Align = -1 | 0 | 1;
|
||||||
|
|
||||||
|
const enum Rotation {
|
||||||
|
None = 0,
|
||||||
|
Deg90 = 1,
|
||||||
|
Deg180 = 2,
|
||||||
|
Deg270 = 3,
|
||||||
|
}
|
||||||
|
|
||||||
type HierarchyParts =
|
type HierarchyParts =
|
||||||
{
|
{
|
||||||
type: "v",
|
type: "v",
|
||||||
|
|
@ -108,16 +115,19 @@ declare module Layout {
|
||||||
type: "btn",
|
type: "btn",
|
||||||
src: Image,
|
src: Image,
|
||||||
cb: () => void,
|
cb: () => void,
|
||||||
|
r?: Rotation,
|
||||||
} | {
|
} | {
|
||||||
type: "btn",
|
type: "btn",
|
||||||
cb: () => void,
|
cb: () => void,
|
||||||
label: string,
|
label: string,
|
||||||
font?: FontNameWithScaleFactor,
|
font?: FontNameWithScaleFactor,
|
||||||
scale?: number,
|
scale?: number,
|
||||||
|
r?: Rotation,
|
||||||
}
|
}
|
||||||
) | {
|
) | {
|
||||||
type: "img",
|
type: "img",
|
||||||
src: Image | (() => Image),
|
src: Image | (() => Image),
|
||||||
|
r?: Rotation,
|
||||||
} | {
|
} | {
|
||||||
type: "custom",
|
type: "custom",
|
||||||
render: (h: Hierarchy) => void,
|
render: (h: Hierarchy) => void,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue