diff --git a/Thermo.Active/wwwroot/assets/styles/base/setup.less b/Thermo.Active/wwwroot/assets/styles/base/setup.less index 73bdf005..653fad4d 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/setup.less +++ b/Thermo.Active/wwwroot/assets/styles/base/setup.less @@ -105,6 +105,7 @@ flex: 1; .borded_label { + cursor: pointer; min-width: 100px; height: 60px; border-radius: 40px; diff --git a/Thermo.Active/wwwroot/assets/styles/style.css b/Thermo.Active/wwwroot/assets/styles/style.css index 85fd6a27..7bca4547 100644 --- a/Thermo.Active/wwwroot/assets/styles/style.css +++ b/Thermo.Active/wwwroot/assets/styles/style.css @@ -90,6 +90,7 @@ flex: 1; } .setup .modal section.body section article .svg-area .borded_label { + cursor: pointer; min-width: 100px; height: 60px; border-radius: 40px; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/index.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/index.ts index 6e9dffd6..a06c587c 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/index.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/index.ts @@ -7,4 +7,17 @@ export default { numeric, slider, keyboard -} \ No newline at end of file +} + +Vue.directive('focusOn', { + bind: function (el: HTMLElement, binding) { + + el.addEventListener('click', (ev) => { + let element = document.getElementById(binding.expression) as HTMLElement; + if (element) { + element.scrollIntoView({ behavior: "smooth", block: "center", inline: "nearest" }); + element.focus(); + } + }) + } +}) \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.ts index 71198c9a..a023329e 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.ts @@ -12,6 +12,9 @@ export default class Numeric extends Vue { // get Value() { return this.value; } // set Value(v) { this.$emit("input", v); } + @Prop({ default: null }) + id: string; + @Prop() min: number; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.vue index 4ded4fce..bf86c0c5 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.vue @@ -1,6 +1,6 @@ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/stampoSVG.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/stampoSVG.ts index 72bac7be..dc19a533 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/stampoSVG.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/stampoSVG.ts @@ -5,6 +5,12 @@ import { Prop } from 'vue-property-decorator'; @Component({}) export default class StampoSVG extends Vue { - @Prop({}) - recipe:Recipe.IRecipe; + @Prop({}) + recipe: Recipe.IRecipe; + + select(name) { + let element = document.getElementsByName(name)[0] as HTMLElement; + element.scrollIntoView(); + element.focus(); + } } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/stampoSVG.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/stampoSVG.vue index 4961c4f8..f7257727 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/stampoSVG.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/stampoSVG.vue @@ -1,63 +1,63 @@ \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.vue index 3752e9c3..81e6b74d 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.vue @@ -6,7 +6,7 @@
- +