loleaflet: fixed js lint erros in src/map/handler/*
This commit is contained in:
parent
feebb0d2a7
commit
81e773ac2a
5 changed files with 13 additions and 13 deletions
|
@ -48,7 +48,6 @@ L.Map.FileInserter = L.Handler.extend({
|
|||
|
||||
_sendFile: function (name, file) {
|
||||
var url = this._url;
|
||||
console.log(url);
|
||||
var xmlHttp = new XMLHttpRequest();
|
||||
xmlHttp.onreadystatechange = function () {
|
||||
if (xmlHttp.readyState === 4 && xmlHttp.status === 200) {
|
||||
|
|
|
@ -229,8 +229,9 @@ L.Map.Keyboard = L.Handler.extend({
|
|||
this.modifier = shift | ctrl | alt;
|
||||
|
||||
if (ctrl) {
|
||||
if (this._handleCtrlCommand(e))
|
||||
if (this._handleCtrlCommand(e)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// page up or page down, handled by this.dopagejump
|
||||
|
@ -309,7 +310,7 @@ L.Map.Keyboard = L.Handler.extend({
|
|||
if (e.type !== 'keydown' && e.originalEvent.key !== 'c' && e.originalEvent.key !== 'v') {
|
||||
e.originalEvent.preventDefault();
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
if (e.originalEvent.keyCode !== 67 && e.originalEvent.keyCode !== 86 && e.originalEvent.key !== 'c' && e.originalEvent.key !== 'v') {
|
||||
// not copy or paste
|
||||
|
|
|
@ -154,14 +154,14 @@ L.Map.Mouse = L.Handler.extend({
|
|||
}
|
||||
}
|
||||
|
||||
this._map.fire('handleautoscroll', { pos: e.containerPoint, map: this._map });
|
||||
this._map.fire('handleautoscroll', {pos: e.containerPoint, map: this._map});
|
||||
}
|
||||
}
|
||||
else if (e.type === 'mousemove' && !this._mouseDown) {
|
||||
clearTimeout(this._mouseOverTimeout);
|
||||
mousePos = docLayer._latLngToTwips(e.latlng);
|
||||
this._mouseOverTimeout = setTimeout(L.bind(function() {
|
||||
docLayer._postMouseEvent('move', mousePos.x, mousePos.y, 1, 0, modifier);
|
||||
docLayer._postMouseEvent('move', mousePos.x, mousePos.y, 1, 0, modifier);
|
||||
}, this),
|
||||
100);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ L.Map.Print = L.Handler.extend({
|
|||
// object URL, because else we might have cross origin security problems
|
||||
var xmlHttp = new XMLHttpRequest();
|
||||
xmlHttp.onreadystatechange = L.bind(function () {
|
||||
if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
|
||||
if (xmlHttp.readyState === 4 && xmlHttp.status === 200) {
|
||||
this._onInitPrint(xmlHttp);
|
||||
}
|
||||
}, this);
|
||||
|
|
|
@ -22,29 +22,29 @@ L.Map.SlideShow = L.Handler.extend({
|
|||
this._map.off('slidedownloadready', this._onSlideDownloadReady, this);
|
||||
},
|
||||
|
||||
_onFullScreen: function (e) {
|
||||
_onFullScreen: function () {
|
||||
this._slideShow = L.DomUtil.create('iframe', '', this._map._container);
|
||||
if (this._slideShow.requestFullscreen) {
|
||||
this._slideShow.requestFullscreen();
|
||||
this._slideShow.requestFullscreen();
|
||||
}
|
||||
else if (this._slideShow.msRequestFullscreen) {
|
||||
this._slideShow.msRequestFullscreen();
|
||||
this._slideShow.msRequestFullscreen();
|
||||
}
|
||||
else if (this._slideShow.mozRequestFullScreen) {
|
||||
this._slideShow.mozRequestFullScreen();
|
||||
this._slideShow.mozRequestFullScreen();
|
||||
}
|
||||
else if (this._slideShow.webkitRequestFullscreen) {
|
||||
this._slideShow.webkitRequestFullscreen();
|
||||
this._slideShow.webkitRequestFullscreen();
|
||||
}
|
||||
|
||||
L.DomEvent['on'](document, 'fullscreenchange webkitfullscreenchange mozfullscreenchange msfullscreenchange',
|
||||
L.DomEvent.on(document, 'fullscreenchange webkitfullscreenchange mozfullscreenchange msfullscreenchange',
|
||||
this._onFullScreenChange, this);
|
||||
|
||||
this.fullscreen = true;
|
||||
this._map.downloadAs('slideshow.svg', 'svg', null, 'slideshow');
|
||||
},
|
||||
|
||||
_onFullScreenChange: function (e) {
|
||||
_onFullScreenChange: function () {
|
||||
|
||||
this.fullscreen = document.fullscreen ||
|
||||
document.webkitIsFullScreen ||
|
||||
|
|
Loading…
Reference in a new issue