mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-10 19:06:36 +00:00
Avoid more info dialog jump
This commit is contained in:
parent
11caadc516
commit
5792c77100
@ -92,7 +92,7 @@ Polymer({
|
|||||||
return re.test(code);
|
return re.test(code);
|
||||||
},
|
},
|
||||||
|
|
||||||
stateObjChanged: function (newVal) {
|
stateObjChanged: function (newVal, oldVal) {
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
this.codeFormat = newVal.attributes.code_format;
|
this.codeFormat = newVal.attributes.code_format;
|
||||||
this.codeInputVisible = this.codeFormat !== null;
|
this.codeInputVisible = this.codeFormat !== null;
|
||||||
@ -110,9 +110,11 @@ Polymer({
|
|||||||
this.armHomeButtonVisible = newVal.state === 'disarmed';
|
this.armHomeButtonVisible = newVal.state === 'disarmed';
|
||||||
this.armAwayButtonVisible = newVal.state === 'disarmed';
|
this.armAwayButtonVisible = newVal.state === 'disarmed';
|
||||||
}
|
}
|
||||||
this.async(function () {
|
if (oldval) {
|
||||||
this.fire('iron-resize');
|
this.async(function () {
|
||||||
}.bind(this), 500);
|
this.fire('iron-resize');
|
||||||
|
}.bind(this), 500);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleDisarmTap: function () {
|
handleDisarmTap: function () {
|
||||||
|
@ -234,7 +234,7 @@ Polymer({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
stateObjChanged: function (newVal) {
|
stateObjChanged: function (newVal, oldVal) {
|
||||||
this.targetTemperatureSliderValue = newVal.attributes.temperature;
|
this.targetTemperatureSliderValue = newVal.attributes.temperature;
|
||||||
this.awayToggleChecked = newVal.attributes.away_mode === 'on';
|
this.awayToggleChecked = newVal.attributes.away_mode === 'on';
|
||||||
this.auxheatToggleChecked = newVal.attributes.aux_heat === 'on';
|
this.auxheatToggleChecked = newVal.attributes.aux_heat === 'on';
|
||||||
@ -260,9 +260,11 @@ Polymer({
|
|||||||
this.swingIndex = -1;
|
this.swingIndex = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.async(function () {
|
if (oldVal) {
|
||||||
this.fire('iron-resize');
|
this.async(function () {
|
||||||
}.bind(this), 500);
|
this.fire('iron-resize');
|
||||||
|
}.bind(this), 500);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computeTargetTempHidden: function (stateObj) {
|
computeTargetTempHidden: function (stateObj) {
|
||||||
|
@ -85,7 +85,7 @@ Polymer({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
stateObjChanged: function (newVal) {
|
stateObjChanged: function (newVal, oldVal) {
|
||||||
this.oscillationToggleChecked = newVal.attributes.oscillating;
|
this.oscillationToggleChecked = newVal.attributes.oscillating;
|
||||||
|
|
||||||
if (newVal.attributes.speed_list) {
|
if (newVal.attributes.speed_list) {
|
||||||
@ -95,9 +95,11 @@ Polymer({
|
|||||||
this.speedIndex = -1;
|
this.speedIndex = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.async(function () {
|
if (oldVal) {
|
||||||
this.fire('iron-resize');
|
this.async(function () {
|
||||||
}.bind(this), 500);
|
this.fire('iron-resize');
|
||||||
|
}.bind(this), 500);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computeClassNames: function (stateObj) {
|
computeClassNames: function (stateObj) {
|
||||||
|
@ -123,7 +123,7 @@ Polymer({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
stateObjChanged: function (newVal) {
|
stateObjChanged: function (newVal, oldVal) {
|
||||||
if (newVal && newVal.state === 'on') {
|
if (newVal && newVal.state === 'on') {
|
||||||
this.brightnessSliderValue = newVal.attributes.brightness;
|
this.brightnessSliderValue = newVal.attributes.brightness;
|
||||||
this.ctSliderValue = newVal.attributes.color_temp;
|
this.ctSliderValue = newVal.attributes.color_temp;
|
||||||
@ -139,9 +139,11 @@ Polymer({
|
|||||||
this.brightnessSliderValue = 0;
|
this.brightnessSliderValue = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.async(function () {
|
if (oldVal) {
|
||||||
this.fire('iron-resize');
|
this.async(function () {
|
||||||
}.bind(this), 500);
|
this.fire('iron-resize');
|
||||||
|
}.bind(this), 500);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computeClassNames: function (stateObj) {
|
computeClassNames: function (stateObj) {
|
||||||
|
@ -47,13 +47,10 @@ Polymer({
|
|||||||
this.callService('lock', { code: this.enteredCode });
|
this.callService('lock', { code: this.enteredCode });
|
||||||
},
|
},
|
||||||
|
|
||||||
stateObjChanged: function (newVal) {
|
stateObjChanged: function (newVal, oldVal) {
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
this.isLocked = newVal.state === 'locked';
|
this.isLocked = newVal.state === 'locked';
|
||||||
}
|
}
|
||||||
this.async(function () {
|
|
||||||
this.fire('iron-resize');
|
|
||||||
}.bind(this), 500);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
callService: function (service, data) {
|
callService: function (service, data) {
|
||||||
|
@ -228,7 +228,7 @@ Polymer({
|
|||||||
|
|
||||||
HAS_MEDIA_STATES: ['playing', 'paused', 'unknown'],
|
HAS_MEDIA_STATES: ['playing', 'paused', 'unknown'],
|
||||||
|
|
||||||
stateObjChanged: function (newVal) {
|
stateObjChanged: function (newVal, oldVal) {
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
this.isOff = newVal.state === 'off';
|
this.isOff = newVal.state === 'off';
|
||||||
this.isPlaying = newVal.state === 'playing';
|
this.isPlaying = newVal.state === 'playing';
|
||||||
@ -253,9 +253,11 @@ Polymer({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.async(function () {
|
if (oldVal) {
|
||||||
this.fire('iron-resize');
|
this.async(function () {
|
||||||
}.bind(this), 500);
|
this.fire('iron-resize');
|
||||||
|
}.bind(this), 500);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computeClassNames: function (stateObj) {
|
computeClassNames: function (stateObj) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user