diff --git a/Thermo.Active/wwwroot/package-lock.json b/Thermo.Active/wwwroot/package-lock.json index db23e3fc..63fbfb8b 100644 --- a/Thermo.Active/wwwroot/package-lock.json +++ b/Thermo.Active/wwwroot/package-lock.json @@ -16304,6 +16304,11 @@ "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==", "dev": true }, + "ts-debounce": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ts-debounce/-/ts-debounce-2.0.1.tgz", + "integrity": "sha512-+TztZrH7GnAD5CKxUohIAqIVHLrtivsYT7tZCLeRTCaBMSsfgYwprhA00kB/m0ezvYheOXJQqPfarAvgoayb7A==" + }, "ts-loader": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-6.2.1.tgz", diff --git a/Thermo.Active/wwwroot/package.json b/Thermo.Active/wwwroot/package.json index b29303c7..63fceec6 100644 --- a/Thermo.Active/wwwroot/package.json +++ b/Thermo.Active/wwwroot/package.json @@ -34,7 +34,8 @@ "vue-smooth-dnd": "0.8.1", "vue2-ace-editor": "0.0.15", "vue2-datepicker": "3.4.1", - "vuex": "3.1.3" + "vuex": "3.1.3", + "ts-debounce": "2.0.1" }, "devDependencies": { "@babel/plugin-proposal-export-default-from": "7.8.3", 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 15635efd..653250a9 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts @@ -1,7 +1,7 @@ import Vue from "vue"; import Component from "vue-class-component"; import { Prop } from 'vue-property-decorator'; - +import { debounce } from "ts-debounce"; @Component({ name: "slider" }) export default class Slider extends Vue { @@ -22,7 +22,7 @@ export default class Slider extends Vue { } set actualvalue(v: number) { - this.value.setpointHMI = v; + debounce(() => this.value.setpointHMI = v, 500) } get step() {