Skip to content

Commit

Permalink
Merge pull request #68 from fdm-monster/bugfix/67-printers-cant-be-pl…
Browse files Browse the repository at this point in the history
…aced-outside-4-by-4-grid-should-be-8-by-8

fix: the grid was calculated as only 4*4 where it should have been 8*8
  • Loading branch information
davidzwa authored Apr 27, 2023
2 parents dc4b633 + b849ebc commit 0bfd3e1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fdm-monster/client",
"version": "1.0.0",
"version": "1.0.1",
"private": false,
"author": "David Zwart",
"license": "AGPL-3.0-or-later",
Expand Down
4 changes: 2 additions & 2 deletions src/components/PrinterGrid/PrinterGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import { defineComponent } from "vue";
import { socketIoFloors } from "../../event-bus/socketio.events";
import PrinterGridTile from "@/components/PrinterGrid/PrinterGridTile.vue";
import {
largeGridcolumnCount,
largeGridColumnCount,
largeGridRowCount,
totalVuetifyColumnCount,
} from "@/constants/printer-grid.constants";
Expand Down Expand Up @@ -97,7 +97,7 @@ export default defineComponent({
return totalVuetifyColumnCount / this.columns;
},
columns() {
return largeGridcolumnCount;
return largeGridColumnCount;
},
rows() {
return largeGridRowCount;
Expand Down
2 changes: 1 addition & 1 deletion src/constants/printer-grid.constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Should not be adjusted unless the grid system is changed to support other than 12
export const totalVuetifyColumnCount = 12;
// Large grid mode
export const largeGridcolumnCount = 4;
export const largeGridColumnCount = 4;
export const largeGridRowCount = 4;
7 changes: 3 additions & 4 deletions src/store/printers.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { PrinterFileService, PrintersService } from "@/backend";
import { CreatePrinter } from "@/models/printers/crud/create-printer.model";
import { FloorService } from "../backend/floor.service";
import { PrinterJobService } from "@/backend/printer-job.service";
import { largeGridColumnCount, largeGridRowCount } from "../constants/printer-grid.constants";

interface State {
printers: Printer[];
Expand Down Expand Up @@ -53,10 +54,8 @@ export const usePrintersStore = defineStore("Printers", {
if (!this.selectedFloor) return [];

const positions = this.selectedFloor.printers;

// TODO introduce client setting for X/Y size
const gridY = 4; // X
const gridX = 4; // Y
const gridY = largeGridRowCount * 2; // X
const gridX = largeGridColumnCount * 2; // Y

const matrix: (Printer | undefined)[][] = [];
for (let i = 0; i < gridY; i++) {
Expand Down

0 comments on commit 0bfd3e1

Please sign in to comment.