From 5af08938d47504cfc45d125b2ae9898534a1e5a1 Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Thu, 30 Jun 2022 14:44:10 +1000 Subject: Add ui-option touchDevice --- src/components/SettingsModal.vue | 4 +--- src/components/Tile.vue | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/components') diff --git a/src/components/SettingsModal.vue b/src/components/SettingsModal.vue index 20259e9..16351c4 100644 --- a/src/components/SettingsModal.vue +++ b/src/components/SettingsModal.vue @@ -85,7 +85,7 @@ -
+
@@ -109,7 +109,6 @@ import SButton from './SButton.vue'; import CloseIcon from './icon/CloseIcon.vue'; import {UiOptions, OptionType, getDefaultLytOpts, getDefaultUiOpts} from '../lib'; import {LayoutOptions} from '../layout'; -import {onTouchDevice} from '../util'; export default defineComponent({ props: { @@ -122,7 +121,6 @@ export default defineComponent({ // For making only two of 'layoutType's values available for user selection saved: false, // Set to true after a setting is saved settingChgTimeout: 0, // Use to throttle some setting-change handling - onTouchDevice: onTouchDevice(), }; }, computed: { diff --git a/src/components/Tile.vue b/src/components/Tile.vue index 7b24590..0105e57 100644 --- a/src/components/Tile.vue +++ b/src/components/Tile.vue @@ -426,7 +426,7 @@ export default defineComponent({ // Click handling onMouseDown(): void { this.highlight = false; - if (!this.uiOpts.useDblClick){ + if (!this.uiOpts.touchDevice){ // Wait for a mouseup or click-hold clearTimeout(this.clickHoldTimer); this.clickHoldTimer = setTimeout(() => { @@ -448,7 +448,7 @@ export default defineComponent({ } }, onMouseUp(): void { - if (!this.uiOpts.useDblClick){ + if (!this.uiOpts.touchDevice){ if (this.clickHoldTimer > 0){ clearTimeout(this.clickHoldTimer); this.clickHoldTimer = 0; -- cgit v1.2.3