mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 17:57:55 +00:00
Better positioning of dialogs
This commit is contained in:
parent
ced3d595cc
commit
c116cb095d
@ -1,2 +1,2 @@
|
||||
""" DO NOT MODIFY. Auto-generated by build_frontend script """
|
||||
VERSION = "1da0ea4a1fbd7b74cf749841b86bbb2d"
|
||||
VERSION = "a82c6e4bf6b91042a6e891d46464275d"
|
||||
|
File diff suppressed because one or more lines are too long
@ -55,7 +55,9 @@ Polymer({
|
||||
this.setEventType(eventType);
|
||||
this.setEventData(eventData);
|
||||
|
||||
this.$.dialog.toggle();
|
||||
this.job('showDialogAfterRender', function() {
|
||||
this.$.dialog.toggle();
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
setEventType: function(eventType) {
|
||||
|
@ -13,12 +13,6 @@
|
||||
layered: true,
|
||||
backdrop: true,
|
||||
transition: 'core-transition-bottom',
|
||||
|
||||
domReady: function() {
|
||||
this.addEventListener('core-overlay-open-completed', function() {
|
||||
this.resizeHandler();
|
||||
}.bind(this));
|
||||
},
|
||||
});
|
||||
</script>
|
||||
</polymer-element>
|
||||
|
@ -29,23 +29,23 @@
|
||||
Polymer({
|
||||
stateObj: {},
|
||||
|
||||
// observe: {
|
||||
// 'stateObj.attributes': 'reposition'
|
||||
// },
|
||||
observe: {
|
||||
'stateObj.attributes': 'reposition'
|
||||
},
|
||||
|
||||
/**
|
||||
* Whenever the attributes change, the more info component can
|
||||
* hide or show elements. We will reposition the dialog.
|
||||
* DISABLED FOR NOW - BAD UX
|
||||
*/
|
||||
// reposition: function(oldVal, newVal) {
|
||||
reposition: function(oldVal, newVal) {
|
||||
// Only resize if already open
|
||||
// if(this.$.dialog.opened) {
|
||||
// this.job('resizeAfterLayoutChange', function() {
|
||||
// this.$.dialog.resizeHandler();
|
||||
// }.bind(this));
|
||||
// }
|
||||
// },
|
||||
if(this.$.dialog.opened) {
|
||||
this.job('resizeAfterLayoutChange', function() {
|
||||
this.$.dialog.resizeHandler();
|
||||
}.bind(this), 1000);
|
||||
}
|
||||
},
|
||||
|
||||
show: function(stateObj) {
|
||||
this.stateObj = stateObj;
|
||||
|
@ -55,7 +55,9 @@ Polymer({
|
||||
this.setService(domain, service);
|
||||
this.$.inputData.value = serviceData;
|
||||
// this.$.inputDataWrapper.update();
|
||||
this.$.dialog.toggle();
|
||||
this.job('showDialogAfterRender', function() {
|
||||
this.$.dialog.toggle();
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
setService: function(domain, service) {
|
||||
|
@ -60,7 +60,9 @@ Polymer({
|
||||
this.setState(state);
|
||||
this.setStateData(stateData);
|
||||
|
||||
this.$.dialog.toggle();
|
||||
this.job('showDialogAfterRender', function() {
|
||||
this.$.dialog.toggle();
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
setEntityId: function(entityId) {
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
max-height: 0px;
|
||||
overflow: hidden;
|
||||
transition: max-height .5s ease-in;
|
||||
transition: max-height .5s ease-in .3s;
|
||||
}
|
||||
|
||||
:host-context(.has-brightness) .brightness {
|
||||
|
@ -8,6 +8,14 @@
|
||||
font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;
|
||||
|
||||
min-width: 350px;
|
||||
max-width: 700px;
|
||||
|
||||
/* First two are from core-transition-bottom */
|
||||
transition:
|
||||
transform 0.2s ease-in-out,
|
||||
opacity 0.2s ease-in,
|
||||
top .3s,
|
||||
left .3s !important;
|
||||
}
|
||||
|
||||
:host .sidebar {
|
||||
|
Loading…
x
Reference in New Issue
Block a user