mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-14 04:46:34 +00:00
upgrade paper-slider and remove min-max hack (#252)
This commit is contained in:
parent
7f69540a92
commit
9aa188079e
@ -20,11 +20,11 @@
|
||||
"polymer": "Polymer/polymer#~1.8.0",
|
||||
"vaadin-combo-box": "vaadin/vaadin-combo-box#~1.1.5",
|
||||
"vaadin-date-picker": "^1.2.1",
|
||||
"paper-slider": "1.0.13",
|
||||
"paper-slider": "1.0.14",
|
||||
"leaflet": "^1.0.2",
|
||||
"polymer-sortablejs": "^0.1.3"
|
||||
},
|
||||
"resolutions": {
|
||||
"paper-slider": "1.0.13"
|
||||
"paper-slider": "1.0.14"
|
||||
}
|
||||
}
|
||||
|
@ -61,19 +61,8 @@ Polymer({
|
||||
|
||||
stateObjectChanged: function (newVal) {
|
||||
this.value = Number(newVal.state);
|
||||
var min = Number(newVal.attributes.min);
|
||||
var max = Number(newVal.attributes.max);
|
||||
|
||||
// Polymer doesn't batch attribute updates
|
||||
// And input_slider blows up when min > max.
|
||||
|
||||
if (max <= this.min) {
|
||||
this.min = min;
|
||||
this.max = max;
|
||||
} else {
|
||||
this.max = max;
|
||||
this.min = min;
|
||||
}
|
||||
this.min = Number(newVal.attributes.min);
|
||||
this.max = Number(newVal.attributes.max);
|
||||
|
||||
this.step = Number(newVal.attributes.step);
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user