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