From a68a55205ed189250693368af7028031a70631d9 Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Tue, 29 Mar 2022 11:39:33 +1100 Subject: Update comments, adjust names, do minor refactors --- src/components/SettingsPane.vue | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'src/components/SettingsPane.vue') diff --git a/src/components/SettingsPane.vue b/src/components/SettingsPane.vue index c9f1833..990d1f7 100644 --- a/src/components/SettingsPane.vue +++ b/src/components/SettingsPane.vue @@ -3,18 +3,19 @@ import {defineComponent, PropType} from 'vue'; import CloseIcon from './icon/CloseIcon.vue'; import type {LayoutOptions} from '../layout'; +// Displays configurable options, and sends option-change requests export default defineComponent({ props: { lytOpts: {type: Object as PropType, required: true}, uiOpts: {type: Object, required: true}, }, methods: { - closeClicked(evt: Event){ - if (evt.target == this.$el || (this.$refs.closeIcon.$el as HTMLElement).contains(evt.target as HTMLElement)){ + onCloseClick(evt: Event){ + if (evt.target == this.$el || (this.$refs.closeIcon as typeof CloseIcon).$el.contains(evt.target)){ this.$emit('settings-close'); } }, - onLayoutOptChg(){ + onLytOptChg(){ this.$emit('layout-option-change'); }, onMinTileSzChg(){ @@ -23,7 +24,7 @@ export default defineComponent({ if (Number(minInput.value) > Number(maxInput.value)){ this.lytOpts.maxTileSz = this.lytOpts.minTileSz; } - this.onLayoutOptChg(); + this.onLytOptChg(); }, onMaxTileSzChg(){ let minInput = this.$refs.minTileSzInput as HTMLInputElement; @@ -31,7 +32,7 @@ export default defineComponent({ if (Number(maxInput.value) < Number(minInput.value)){ this.lytOpts.minTileSz = this.lytOpts.maxTileSz; } - this.onLayoutOptChg(); + this.onLytOptChg(); }, }, components: {CloseIcon, }, @@ -41,13 +42,13 @@ export default defineComponent({ -- cgit v1.2.3