Fixed none vanishing manual update control when switching to auto update.

This commit is contained in:
Sascha L. Teichmann 2015-03-13 17:06:50 +01:00
parent f71db790e7
commit 7a6d0a0d31

View File

@ -118,12 +118,8 @@ L.control.coordinates({
var manualUpdateControl; var manualUpdateControl;
if (useWebsocket && 'WebSocket' in window) { if (useWebsocket && 'WebSocket' in window) {
L.autoUpdate('autoUpdate', function(pressed) { L.autoUpdate('autoUpdate', function(pressed) {
if (pressed) { var styleDec = manualUpdateControl.getContainer().style;
manualUpdateControl.getContainer().style = 'visibility: hidden'; styleDec.visibility = pressed ? 'hidden' : 'visible';
}
else {
manualUpdateControl.getContainer().style = 'visibility: visible';
}
}, },
players); players);
} }