kopia lustrzana https://github.com/FacilMap/facilmap
Set pad ID only on connect (to avoid setting it twice in some cases)
rodzic
1358ecfad4
commit
9ceb14f485
|
@ -157,7 +157,7 @@
|
|||
fmSocket.views = { };
|
||||
},
|
||||
|
||||
reconnect: function() {
|
||||
connect: function() {
|
||||
if(fmSocket.padId)
|
||||
setPadId(fmSocket.padId);
|
||||
else
|
||||
|
@ -171,12 +171,8 @@
|
|||
for(var i in handlers)
|
||||
fmSocket.on(i, handlers[i]);
|
||||
|
||||
if(padId) {
|
||||
// Run with delay, so that loadStart event handler can register before
|
||||
fmSocket.$applyAsync(function() {
|
||||
fmSocket.setPadId(padId);
|
||||
});
|
||||
}
|
||||
if(padId)
|
||||
fmSocket.padId = padId;
|
||||
|
||||
fmSocket.$on("$destroy", function() {
|
||||
socket.removeAllListeners();
|
||||
|
|
Ładowanie…
Reference in New Issue