-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the ability to set custom layout sizes.
- Loading branch information
Showing
12 changed files
with
116 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export interface LayoutSize { | ||
getLayoutWidth(): number; | ||
getLayoutHeight(): number; | ||
} | ||
|
||
export function isLayoutSize(object: unknown): object is LayoutSize { | ||
return ( | ||
typeof object === "object" && | ||
object !== null && | ||
"getLayoutWidth" in object && | ||
"getLayoutHeight" in object && | ||
typeof object["getLayoutWidth"] === "function" && | ||
typeof object["getLayoutHeight"] === "function" | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
import { Rectangle } from "pixi.js-legacy"; | ||
|
||
export default interface Positioner { | ||
export interface Positioner { | ||
arrange(screen: Rectangle): void; | ||
} | ||
|
||
export function isPositioner(object: unknown): object is Positioner { | ||
return ( | ||
typeof object === "object" && | ||
object !== null && | ||
"arrange" in object && | ||
typeof object["arrange"] === "function" | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { HStack, VStack, Stack } from "./Stack"; | ||
import { Leaf } from "./Leaf"; | ||
import { Grid } from "./Grid"; | ||
import Positioner from "./Positioner"; | ||
import Partitioner from "./Partitioner"; | ||
import { Positioner } from "./Positioner"; | ||
import { Partitioner } from "./Partitioner"; | ||
|
||
export { Stack, HStack, VStack, Leaf, Grid, Positioner, Partitioner }; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters