diff --git a/src/utils/main.js b/src/file-renderer/index.js similarity index 90% rename from src/utils/main.js rename to src/file-renderer/index.js index 3965d65..06819aa 100644 --- a/src/utils/main.js +++ b/src/file-renderer/index.js @@ -1,6 +1,6 @@ -import { jDataView } from "../utils/jdataview"; -import { pesRead } from "../utils/pesformat"; -import { Pattern } from "../utils/pattern"; +import { jDataView } from "./jdataview"; +import { pesRead } from "../format-readers/pes"; +import { Pattern } from "./pattern"; String.prototype.endsWith = function (suffix) { return this.indexOf(suffix, this.length - suffix.length) !== -1; @@ -49,7 +49,7 @@ function handleFileReadError(evt) { } } -export function startFileRead(fileObject, canvas) { +export default function renderFileToCanvas(fileObject, canvas) { const reader = new FileReader(); reader.onloadend = function (x) { diff --git a/src/utils/jdataview.js b/src/file-renderer/jdataview.js similarity index 100% rename from src/utils/jdataview.js rename to src/file-renderer/jdataview.js diff --git a/src/utils/pattern.js b/src/file-renderer/pattern.js similarity index 100% rename from src/utils/pattern.js rename to src/file-renderer/pattern.js diff --git a/src/utils/pesformat.js b/src/format-readers/pes.js similarity index 98% rename from src/utils/pesformat.js rename to src/format-readers/pes.js index e0b0b9a..6c6a48f 100644 --- a/src/utils/pesformat.js +++ b/src/format-readers/pes.js @@ -1,4 +1,4 @@ -import { Color, stitchTypes } from "./pattern"; +import { Color, stitchTypes } from "../file-renderer/pattern"; const namedColors = [ new Color(0, 0, 0, "Unknown"), diff --git a/src/lib/CardList.svelte b/src/lib/CardList.svelte index f8770d5..fe93d26 100644 --- a/src/lib/CardList.svelte +++ b/src/lib/CardList.svelte @@ -1,5 +1,5 @@