Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
Ironicbay committed Jan 16, 2025
1 parent 8715e3e commit 0a59621
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion client/src/views/viewers/SpreadsheetViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
@click="toggleFullScreen"
:icon="scan"
/>
<file-controls-zoom @change="onZoomLevelChange" />
</file-controls>
</template>
</file-viewer-wrapper>
Expand All @@ -39,7 +40,7 @@
import { MsSpinner, I18n, Translatable, MsReportText, MsReportTheme } from 'megashark-lib';
import { onBeforeMount, onMounted, Ref, ref } from 'vue';
import XLSX from 'xlsx';
import { FileControls, FileControlsButton } from '@/components/viewers';
import { FileControls, FileControlsButton, FileControlsZoom } from '@/components/viewers';
import { FileViewerWrapper } from '@/views/viewers';
import { FileContentInfo } from '@/views/viewers/utils';
import { scan } from 'ionicons/icons';
Expand Down Expand Up @@ -110,6 +111,21 @@ async function switchToPage(page: string): Promise<void> {
async function toggleFullScreen(): Promise<void> {
await spreadsheet.value.requestFullscreen();
}

function onZoomLevelChange(value: number): void {
const wscols = [

Check warning on line 116 in client/src/views/viewers/SpreadsheetViewer.vue

View workflow job for this annotation

GitHub Actions / spelling / cspell

Unknown word (wscols)
{ wpx: value },
{ wpx: value },
{ wpx: value },
{ wpx: value },
];

if (workbook) {
console.log(workbook.Sheets, workbook.Sheets[currentPage.value]);

(workbook.Sheets[currentPage.value])['!cols'] = wscols;

Check warning on line 126 in client/src/views/viewers/SpreadsheetViewer.vue

View workflow job for this annotation

GitHub Actions / spelling / cspell

Unknown word (wscols)
}
}
</script>

<style scoped lang="scss">
Expand Down

0 comments on commit 0a59621

Please sign in to comment.