diff --git a/Thermo.Active/wwwroot/config.development.json b/Thermo.Active/wwwroot/config.development.json index 8c7723c2..58ce0f2f 100644 --- a/Thermo.Active/wwwroot/config.development.json +++ b/Thermo.Active/wwwroot/config.development.json @@ -2,7 +2,7 @@ "env": "development", "api": { "enabled": true, - "apiServerUrl": "http://localhost:9000/" + "apiServerUrl": "http://seriate.steamware.net:9000/" }, "allUIVisible": true } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/index.html b/Thermo.Active/wwwroot/index.html index e00637af..ac35876a 100644 --- a/Thermo.Active/wwwroot/index.html +++ b/Thermo.Active/wwwroot/index.html @@ -13,7 +13,7 @@ - + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts index 9f60bb8e..291e9314 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts @@ -1,8 +1,9 @@ import Vue from "vue"; import Component from "vue-class-component"; import { Prop } from 'vue-property-decorator'; -import { debounce } from "@/_base/debounce"; + import { Hub } from "@/services"; +import Numeric from "./numeric"; @Component({ name: "slider" }) export default class Slider extends Vue { @@ -17,6 +18,8 @@ export default class Slider extends Vue { @Prop({ default: 1 }) decimal: number; + incrementing: number = 0; + tempValue: number = null; get actualvalue() { return this.value.setpointHMI; @@ -27,11 +30,9 @@ export default class Slider extends Vue { } set actualvalue(v: number) { - this.debouncedActualValue(v) + this.value.setpointHMI = v; } - debouncedActualValue = debounce((v: number) => this.value.setpointHMI = v, 200); - get step() { // var s = ((this.value.range.max - this.value.range.min) / (this.lines + 1)); // var m = Math.pow(10, this.decimal); @@ -39,31 +40,43 @@ export default class Slider extends Vue { return 1; }; - increment() { + startIncrement() { if (!this.value.status.enabled) return; + this.incrementing = setInterval(() => { + var v = this.value.setpointHMI; + if (v < this.value.range.max) { + v += this.step; + } + if (v > this.value.range.max) { + v = this.value.range.max; + } + this.actualvalue = v; + }, 50); + } + + startDecrement() { + if (!this.value.status.enabled) return; + this.incrementing = setInterval(() => { + var v = this.value.setpointHMI; + if (v > this.value.range.min) { + v -= this.step; + } + if (v < this.value.range.min) { + v = this.value.range.min; + } + this.actualvalue = v; + }, 50); + } + + confirm() { + if (!this.value.status.enabled) return; + if (this.incrementing) + clearInterval(this.incrementing); + + this.incrementing = 0; - var v = this.value.setpointHMI; - if (v < this.value.range.max) { - v += this.step; - } - if (v > this.value.range.max) { - v = this.value.range.max; - } - this.actualvalue = v; }; - decrement() { - if (!this.value.status.enabled) return; - - var v = this.value.setpointHMI; - if (v > this.value.range.min) { - v -= this.step; - } - if (v < this.value.range.min) { - v = this.value.range.min; - } - this.actualvalue = v; - }; doSoftKeyClick() { Hub.Current.sendUserSoftKey(this.softKey.id); diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue index 49e20882..b8809087 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue @@ -1,7 +1,7 @@