busypopup: fadeout also when showing new popup
- be sure overlay will be removed - show fadout effect also when closing old popup and showing new one Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: I6565c96d664a2a289a9950cc2a6b60677872a3a9
This commit is contained in:
parent
05f684990e
commit
72ac57cce5
3 changed files with 6 additions and 16 deletions
|
@ -955,9 +955,9 @@ input[type='checkbox']:checked.autofilter, .jsdialog input[type='checkbox']:chec
|
|||
/* dialog/popup fade animation */
|
||||
|
||||
.fadeout {
|
||||
animation: fade 1s;
|
||||
-webkit-animation: fade 1s;
|
||||
-moz-animation: fade 1s;
|
||||
animation: fade 0.7s;
|
||||
-webkit-animation: fade 0.7s;
|
||||
-moz-animation: fade 0.7s;
|
||||
}
|
||||
|
||||
@keyframes fade {
|
||||
|
|
|
@ -75,6 +75,8 @@ L.Control.JSDialog = L.Control.extend({
|
|||
var container = this.dialogs[data.id].container;
|
||||
L.DomUtil.addClass(container, 'fadeout');
|
||||
container.onanimationend = function() { that.close(data.id); };
|
||||
// be sure it will be removed
|
||||
setTimeout(function() { that.close(data.id); }, 700);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -102,18 +102,6 @@ L.Control.UIManager = L.Control.extend({
|
|||
}, 700);
|
||||
};
|
||||
|
||||
var closeBusyPopup = function() {
|
||||
clearTimeout(this.busyPopupTimer);
|
||||
var json = {
|
||||
id: 'busypopup',
|
||||
jsontype: 'dialog',
|
||||
type: 'modalpopup',
|
||||
action: 'close'
|
||||
};
|
||||
if (app.socket)
|
||||
app.socket._onMessage({textMsg: 'jsdialog: ' + JSON.stringify(json)});
|
||||
};
|
||||
|
||||
var fadeoutBusyPopup = function() {
|
||||
clearTimeout(this.busyPopupTimer);
|
||||
var json = {
|
||||
|
@ -127,7 +115,7 @@ L.Control.UIManager = L.Control.extend({
|
|||
};
|
||||
|
||||
this.map.on('showbusy', function(e) {
|
||||
closeBusyPopup();
|
||||
fadeoutBusyPopup();
|
||||
openBusyPopup(e.label);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue