From 42a4d859d0130276c1aaf94c2b389ea17cb04857 Mon Sep 17 00:00:00 2001 From: Penny Wood Date: Thu, 14 Nov 2024 21:35:53 +0800 Subject: [PATCH] fix: Tool rows in even lengths, and more visually tidy (#2041) Co-authored-by: Stefan Dej --- src/components/panels/Extruder/ExtruderControlPanelTools.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/panels/Extruder/ExtruderControlPanelTools.vue b/src/components/panels/Extruder/ExtruderControlPanelTools.vue index 5cce8979d..1ae8b6bc0 100644 --- a/src/components/panels/Extruder/ExtruderControlPanelTools.vue +++ b/src/components/panels/Extruder/ExtruderControlPanelTools.vue @@ -21,7 +21,8 @@ export default class ExtruderControlPanel extends Mixins(BaseMixin, ControlMixin mdiPrinter3dNozzle = mdiPrinter3dNozzle get rows() { - const cols = 6 + const len = this.toolchangeMacros.length + const cols = Math.ceil(len / Math.ceil(len / 6)) let rows = [] for (let i = 0; i < this.toolchangeMacros.length; i += cols) {