moar paramz

This commit is contained in:
2018-09-17 15:34:41 +02:00
parent bd1ac5c7a4
commit 0a67f05189
7 changed files with 71 additions and 39 deletions

View File

@@ -11897,23 +11897,22 @@ class PresetSwitch extends __WEBPACK_IMPORTED_MODULE_1__base_Switch_Switch__["a"
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__base_Slider_Slider__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__core_store_RestStore__ = __webpack_require__(2);
//import Store from '../core/store/RestStore';
class ParamSlider extends __WEBPACK_IMPORTED_MODULE_1__base_Slider_Slider__["a" /* default */] {
constructor(ctx, node) {
super(ctx, node);
this.store = new __WEBPACK_IMPORTED_MODULE_2__core_store_RestStore__["a" /* default */](this.config.endpoint);
//this.store = new Store(this.config.endpoint);
}
onChange(evt) {
this.store.save({
param: this.config.name,
value: this.value
});
this.ctx.ws.send(JSON.stringify({
topic: this.config.topic,
payload: evt.target.value
}));
}
}
@@ -12022,7 +12021,10 @@ class ParamWs extends __WEBPACK_IMPORTED_MODULE_1__base_TextInput_TextInput__["a
obj[this.config.name] = this.value;
//this.store.save(obj);
console.log(this.value);
this.ws.send(this.value);
this.ctx.ws.send({
topic: this.config.topic,
payload: this.value
});
this.ctx.mediator.trigger(this.config.endpoint, this.value);
}