From 4bfd6889b2d6184f5500f47231b8288b4c04df04 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Tue, 5 Jul 2022 13:55:50 +1000
Subject: Revert to showing px in settings instead of mm

With mm, moving the slider would sometimes leave the value unchanged
---
 src/components/SettingsModal.vue | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

(limited to 'src/components/SettingsModal.vue')

diff --git a/src/components/SettingsModal.vue b/src/components/SettingsModal.vue
index c946095..baa16a5 100644
--- a/src/components/SettingsModal.vue
+++ b/src/components/SettingsModal.vue
@@ -57,7 +57,7 @@
 					min="15" :max="uiOpts.breakpoint == 'sm' ? 150 : 200" v-model.number="lytOpts.minTileSz"
 					@input="onSettingChgThrottled('LYT', 'minTileSz')" @change="onSettingChg('LYT', 'minTileSz')"
 					name="minTileSizeInput" ref="minTileSzInput"/>
-				<div class="my-auto text-right">{{pxToDisplayStr(lytOpts.minTileSz)}}</div>
+				<div class="my-auto text-right">{{lytOpts.minTileSz}} px</div>
 				<!-- Row 2 -->
 				<label for="maxTileSizeInput" @click="onReset('LYT', 'maxTileSz')" :class="rLabelClasses">
 					Max Tile Size
@@ -65,7 +65,7 @@
 				<input type="range" min="15" max="400" v-model.number="lytOpts.maxTileSz"
 					@input="onSettingChgThrottled('LYT', 'maxTileSz')" @change="onSettingChg('LYT', 'maxTileSz')"
 					name="maxTileSizeInput" ref="maxTileSzInput"/>
-				<div class="my-auto text-right">{{pxToDisplayStr(lytOpts.maxTileSz)}}</div>
+				<div class="my-auto text-right">{{lytOpts.maxTileSz}} px</div>
 				<!-- Row 3 -->
 				<label for="tileSpacingInput" @click="onReset('LYT', 'tileSpacing')" :class="rLabelClasses">
 					Tile Spacing
@@ -73,7 +73,7 @@
 				<input type="range" min="0" max="20" v-model.number="lytOpts.tileSpacing"
 					@input="onSettingChgThrottled('LYT', 'tileSpacing')" @change="onSettingChg('LYT', 'tileSpacing')"
 					name="tileSpacingInput"/>
-				<div class="my-auto text-right">{{pxToDisplayStr(lytOpts.tileSpacing)}}</div>
+				<div class="my-auto text-right">{{lytOpts.tileSpacing}} px</div>
 			</div>
 		</div>
 		<div class="pb-2 px-2 md:px-3" :class="borderBClasses">
@@ -226,9 +226,6 @@ export default defineComponent({
 			// Clear saved-indicator
 			this.saved = false;
 		},
-		pxToDisplayStr(px: number): string {
-			return (px / 3.78).toFixed() + ' mm';
-		}
 	},
 	components: {SButton, CloseIcon, },
 	emits: ['close', 'setting-chg', 'reset', ],
-- 
cgit v1.2.3

