mirror of
https://gitlab.com/wirelos/sprocket-ui.git
synced 2025-12-14 22:02:24 +01:00
moar paramz
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user