mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-22 08:28:12 +08:00
Assorted code file cleanup following Svelte switch
This commit is contained in:
@@ -25,8 +25,8 @@
|
||||
import CanvasRuler from "@/components/widgets/metrics/CanvasRuler.svelte";
|
||||
import PersistentScrollbar from "@/components/widgets/metrics/PersistentScrollbar.svelte";
|
||||
import WidgetLayout from "@/components/widgets/WidgetLayout.svelte";
|
||||
import { type Editor } from "@/wasm-communication/editor";
|
||||
import { type DocumentState } from "@/state-providers/document";
|
||||
import type { Editor } from "@/wasm-communication/editor";
|
||||
import type { DocumentState } from "@/state-providers/document";
|
||||
|
||||
let rulerHorizontal: CanvasRuler;
|
||||
let rulerVertical: CanvasRuler;
|
||||
@@ -50,13 +50,13 @@
|
||||
|
||||
// Rulers
|
||||
let rulerOrigin: XY = { x: 0, y: 0 };
|
||||
let rulerSpacing: number = 100;
|
||||
let rulerInterval: number = 100;
|
||||
let rulerSpacing = 100;
|
||||
let rulerInterval = 100;
|
||||
|
||||
// Rendered SVG viewport data
|
||||
let artworkSvg: string = "";
|
||||
let artboardSvg: string = "";
|
||||
let overlaysSvg: string = "";
|
||||
let artworkSvg = "";
|
||||
let artboardSvg = "";
|
||||
let overlaysSvg = "";
|
||||
|
||||
// Rasterized SVG viewport data, or none if it's not up-to-date
|
||||
let rasterizedCanvas: HTMLCanvasElement | undefined = undefined;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
import IconButton from "@/components/widgets/buttons/IconButton.svelte";
|
||||
import IconLabel from "@/components/widgets/labels/IconLabel.svelte";
|
||||
import WidgetLayout from "@/components/widgets/WidgetLayout.svelte";
|
||||
import { type Editor } from "@/wasm-communication/editor";
|
||||
import type { Editor } from "@/wasm-communication/editor";
|
||||
|
||||
type LayerListingInfo = {
|
||||
folderIndex: number;
|
||||
@@ -47,7 +47,7 @@
|
||||
const editor = getContext<Editor>("editor");
|
||||
|
||||
// Layer data
|
||||
let layerCache: Map<string, LayerPanelEntry> = new Map(); // TODO: replace with BigUint64Array as index
|
||||
let layerCache = new Map<string, LayerPanelEntry>(); // TODO: replace with BigUint64Array as index
|
||||
let layers: LayerListingInfo[] = [];
|
||||
|
||||
// Interactive dragging
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
import IconLabel from "@/components/widgets/labels/IconLabel.svelte";
|
||||
import TextLabel from "@/components/widgets/labels/TextLabel.svelte";
|
||||
import WidgetLayout from "@/components/widgets/WidgetLayout.svelte";
|
||||
import { type Editor } from "@/wasm-communication/editor";
|
||||
import { type NodeGraphState } from "@/state-providers/node-graph";
|
||||
import type { Editor } from "@/wasm-communication/editor";
|
||||
import type { NodeGraphState } from "@/state-providers/node-graph";
|
||||
|
||||
const WHEEL_RATE = (1 / 600) * 3;
|
||||
const GRID_COLLAPSE_SPACING = 10;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import LayoutCol from "@/components/layout/LayoutCol.svelte";
|
||||
import LayoutRow from "@/components/layout/LayoutRow.svelte";
|
||||
import WidgetLayout from "@/components/widgets/WidgetLayout.svelte";
|
||||
import { type Editor } from "@/wasm-communication/editor";
|
||||
import type { Editor } from "@/wasm-communication/editor";
|
||||
|
||||
const editor = getContext<Editor>("editor");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user