loleaflet: Fix insertfile after the L.Socket -> this._map.socket change.
This commit is contained in:
parent
3eeecacfb9
commit
dd5a8a7cb4
1 changed files with 2 additions and 1 deletions
|
@ -48,9 +48,10 @@ L.Map.FileInserter = L.Handler.extend({
|
|||
_sendFile: function (name, file) {
|
||||
var url = this._url;
|
||||
var xmlHttp = new XMLHttpRequest();
|
||||
var socket = this._map._socket;
|
||||
xmlHttp.onreadystatechange = function () {
|
||||
if (xmlHttp.readyState === 4 && xmlHttp.status === 200) {
|
||||
this._map._socket.sendMessage('insertfile name=' + name + ' type=graphic');
|
||||
socket.sendMessage('insertfile name=' + name + ' type=graphic');
|
||||
}
|
||||
};
|
||||
xmlHttp.open('POST', url, true);
|
||||
|
|
Loading…
Reference in a new issue