Skip to content

Commit

Permalink
Web formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
elbertronnie committed Nov 10, 2024
1 parent 3d32333 commit 3007fb6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/panels/Document.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import { getContext, onMount, tick } from "svelte";
import type { DocumentState } from "@graphite/state-providers/document";
import { extractContent } from "@graphite/utility-functions/files";
import { textInputCleanup } from "@graphite/utility-functions/keyboard-entry";
import { extractPixelData, rasterizeSVGCanvas } from "@graphite/utility-functions/rasterization";
import { extractContent } from "@graphite/utility-functions/files";
import { updateBoundsOfViewports } from "@graphite/utility-functions/viewports";
import type { Editor } from "@graphite/wasm-communication/editor";
import {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/panels/Layers.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import { beginDraggingElement } from "@graphite/io-managers/drag";
import type { NodeGraphState } from "@graphite/state-providers/node-graph";
import { extractContent } from "@graphite/utility-functions/files";
import { platformIsMac } from "@graphite/utility-functions/platform";
import { extractPixelData } from "@graphite/utility-functions/rasterization";
import { extractContent } from "@graphite/utility-functions/files";
import type { Editor } from "@graphite/wasm-communication/editor";
import { defaultWidgetLayout, patchWidgetLayout, UpdateDocumentLayerDetails, UpdateDocumentLayerStructureJs, UpdateLayersPanelOptionsLayout } from "@graphite/wasm-communication/messages";
import type { DataBuffer, LayerPanelEntry } from "@graphite/wasm-communication/messages";
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/window/workspace/Panel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
<script lang="ts">
import { getContext, tick } from "svelte";
import { extractContent } from "@graphite/utility-functions/files";
import { platformIsMac, isEventSupported } from "@graphite/utility-functions/platform";
import { extractPixelData } from "@graphite/utility-functions/rasterization";
import { extractContent } from "@graphite/utility-functions/files";
import type { Editor } from "@graphite/wasm-communication/editor";
import { type LayoutKeysGroup, type Key } from "@graphite/wasm-communication/messages";
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/io-managers/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { type DialogState } from "@graphite/state-providers/dialog";
import { type DocumentState } from "@graphite/state-providers/document";
import { type FullscreenState } from "@graphite/state-providers/fullscreen";
import { type PortfolioState } from "@graphite/state-providers/portfolio";
import { extractContent } from "@graphite/utility-functions/files";
import { makeKeyboardModifiersBitfield, textInputCleanup, getLocalizedScanCode } from "@graphite/utility-functions/keyboard-entry";
import { platformIsMac } from "@graphite/utility-functions/platform";
import { extractPixelData } from "@graphite/utility-functions/rasterization";
import { extractContent } from "@graphite/utility-functions/files"
import { stripIndents } from "@graphite/utility-functions/strip-indents";
import { updateBoundsOfViewports } from "@graphite/utility-functions/viewports";
import { type Editor } from "@graphite/wasm-communication/editor";
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/utility-functions/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ export async function replaceBlobURLsWithBase64(svg: string): Promise<string> {
export async function extractContent(blob: Blob): Promise<Uint8Array> {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.onload = () => resolve(new Uint8Array(reader.result));
reader.onerror = () => reject(new Error('Error reading the blob.'));
reader.onload = () => resolve(new Uint8Array(reader.result as ArrayBuffer));
reader.onerror = () => reject(new Error("Error reading the blob."));
reader.readAsArrayBuffer(blob);
});
}

0 comments on commit 3007fb6

Please sign in to comment.