mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 15:06:15 -04:00
fix animation function if called multiple times
This commit is contained in:
parent
651047cfa8
commit
0436a2185a
2 changed files with 7 additions and 3 deletions
|
@ -390,7 +390,7 @@ class PeersManager {
|
||||||
Events.on('files-selected', e => this._onFilesSelected(e.detail));
|
Events.on('files-selected', e => this._onFilesSelected(e.detail));
|
||||||
Events.on('send-text', e => this._onSendText(e.detail));
|
Events.on('send-text', e => this._onSendText(e.detail));
|
||||||
Events.on('peer-left', e => this._onPeerLeft(e.detail));
|
Events.on('peer-left', e => this._onPeerLeft(e.detail));
|
||||||
Events.on('disconnect', this._clearPeers);
|
Events.on('disconnect', _ => this._clearPeers());
|
||||||
}
|
}
|
||||||
|
|
||||||
_onMessage(message) {
|
_onMessage(message) {
|
||||||
|
|
|
@ -659,8 +659,12 @@ Events.on('load', () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
window.animateBackground = function(l) {
|
window.animateBackground = function(l) {
|
||||||
loading = l;
|
if (!l) {
|
||||||
animate();
|
loading = false;
|
||||||
|
} else if (!loading) {
|
||||||
|
loading = true;
|
||||||
|
animate();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
init();
|
init();
|
||||||
animate();
|
animate();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue