mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 12:58:12 +08:00
Enable some TS consistency lints
This commit is contained in:
@@ -404,6 +404,12 @@ export default defineComponent({
|
||||
window.dispatchEvent(new Event("resize"));
|
||||
},
|
||||
data() {
|
||||
const scrollbarPos: XY = { x: 0.5, y: 0.5 };
|
||||
const scrollbarSize: XY = { x: 0.5, y: 0.5 };
|
||||
const scrollbarMultiplier: XY = { x: 0, y: 0 };
|
||||
|
||||
const rulerOrigin: XY = { x: 0, y: 0 };
|
||||
|
||||
return {
|
||||
// Interactive text editing
|
||||
textInput: undefined as undefined | HTMLDivElement,
|
||||
@@ -414,12 +420,12 @@ export default defineComponent({
|
||||
canvasCursor: "default" as MouseCursorIcon,
|
||||
|
||||
// Scrollbars
|
||||
scrollbarPos: { x: 0.5, y: 0.5 } as XY,
|
||||
scrollbarSize: { x: 0.5, y: 0.5 } as XY,
|
||||
scrollbarMultiplier: { x: 0, y: 0 } as XY,
|
||||
scrollbarPos,
|
||||
scrollbarSize,
|
||||
scrollbarMultiplier,
|
||||
|
||||
// Rulers
|
||||
rulerOrigin: { x: 0, y: 0 } as XY,
|
||||
rulerOrigin,
|
||||
rulerSpacing: 100 as number,
|
||||
rulerInterval: 100 as number,
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
// TODO: Try and get rid of the need for this file
|
||||
|
||||
export interface TextButtonWidget {
|
||||
tooltip?: string;
|
||||
message?: string | object;
|
||||
callback?: () => void;
|
||||
props: {
|
||||
kind: "TextButton";
|
||||
label: string;
|
||||
icon?: string;
|
||||
emphasized?: boolean;
|
||||
minWidth?: number;
|
||||
disabled?: boolean;
|
||||
|
||||
// Callbacks
|
||||
// `action` is used via `IconButtonWidget.callback`
|
||||
};
|
||||
}
|
||||
@@ -62,6 +62,7 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, type PropType } from "vue";
|
||||
|
||||
@@ -70,6 +71,23 @@ import { type IconName } from "@/utility-functions/icons";
|
||||
import IconLabel from "@/components/widgets/labels/IconLabel.vue";
|
||||
import TextLabel from "@/components/widgets/labels/TextLabel.vue";
|
||||
|
||||
export type TextButtonWidget = {
|
||||
tooltip?: string;
|
||||
message?: string | object;
|
||||
callback?: () => void;
|
||||
props: {
|
||||
kind: "TextButton";
|
||||
label: string;
|
||||
icon?: string;
|
||||
emphasized?: boolean;
|
||||
minWidth?: number;
|
||||
disabled?: boolean;
|
||||
|
||||
// Callbacks
|
||||
// `action` is used via `IconButtonWidget.callback`
|
||||
};
|
||||
};
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
label: { type: String as PropType<string>, required: true },
|
||||
|
||||
Reference in New Issue
Block a user