diff --git a/src/components/scroller.ts b/src/components/scroller.ts index 0e88b7c..e754596 100644 --- a/src/components/scroller.ts +++ b/src/components/scroller.ts @@ -193,7 +193,6 @@ export class Scroller { } if (event.metaKey || event.ctrlKey) { - console.log(event.code); if (event.code === "KeyC") { let cells: Cell[][] = undefined!; const selection = new Selection(); diff --git a/src/main.ts b/src/main.ts index 4239f77..1c2d7fd 100644 --- a/src/main.ts +++ b/src/main.ts @@ -124,7 +124,6 @@ export default class Spreadsheet { private setColumnsBarPosition() { const top = this.toolbar.height; const left = this.rowsBar.width; - console.log(top, left); this.columnsBar.setElementPosition(top, left); } @@ -163,8 +162,6 @@ export default class Spreadsheet { rows: cachedRows, }); - console.log("CACHE: ", cache); - console.log("CONFIG: ", this.config); return cache; } @@ -333,11 +330,12 @@ export default class Spreadsheet { public loadData(data: Cell[][] | SerializableCell[][]): Spreadsheet { const rowsLength = data.length; - const colsLength = data[0] ? this.data[0].length : 0; + const colsLength = data[0] ? data[0].length : 0; + console.log("!!FORMATTED DATA", rowsLength, colsLength, data[0]) this.data = []; const formattedData: Cell[][] = []; - + // Transform serialized objects to Cells for (let row = 0; row < rowsLength; row++) { const innerRow: Cell[] = []; for (let col = 0; col < colsLength; col++) { @@ -355,6 +353,7 @@ export default class Spreadsheet { formattedData.push(innerRow); } + this.data = formattedData; this.selection.selectedCell = null; diff --git a/vite.config.ts b/vite.config.ts index 166aa78..d771a1c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,7 +2,6 @@ import { defineConfig } from "vite"; import path from "path"; import typescript from "@rollup/plugin-typescript"; import { typescriptPaths } from "rollup-plugin-typescript-paths"; -import { fileURLToPath } from "node:url"; export default defineConfig({ base: "/modern_spreadsheet/",