+
-
@@ -50,7 +51,6 @@
stateObj: {
type: Object,
- observer: 'reposition',
},
stateHistory: {
@@ -73,6 +73,11 @@
},
},
+ listeners: {
+ 'iron-overlay-opened': 'onIronOverlayOpened',
+ 'iron-overlay-closed': 'onIronOverlayClosed'
+ },
+
componentStoreChanged: function(componentStore) {
this.hasHistoryComponent = componentStore.isLoaded('history');
},
@@ -101,12 +106,12 @@
}
},
- dialogOpenChanged: function(ev) {
- // we get CustomEvent, undefined and true/false from polymer…
- console.log('debug', ev);
- if (typeof ev === 'object') {
- this.dialogOpen = ev.detail;
- }
+ onIronOverlayOpened: function() {
+ this.dialogOpen = true;
+ },
+
+ onIronOverlayClosed: function() {
+ this.dialogOpen = false;
},
changeEntityId: function(entityId) {
@@ -121,19 +126,6 @@
}
},
- /**
- * Whenever the attributes change, the more info component can
- * hide or show elements. We will reposition the dialog.
- */
- reposition: function(newVal, oldVal) {
- // Only resize if already open
- if(this.dialogOpen) {
- this.debounce('resizeAfterLayoutChange', function() {
- this.$.dialog.resizeHandler();
- }.bind(this), 1000);
- }
- },
-
show: function(entityId) {
this.changeEntityId(entityId);