add indent eslint rule and fix some whitespace
This commit is contained in:
parent
d7007ef353
commit
954ef1cc10
@ -10,6 +10,7 @@
|
||||
"space-after-keywords": 2,
|
||||
"no-lonely-if": 2,
|
||||
"comma-style": 2,
|
||||
"indent": [2, "tab"],
|
||||
"no-underscore-dangle": 0,
|
||||
"no-constant-condition": 0,
|
||||
"no-multi-spaces": 0,
|
||||
|
@ -4,7 +4,7 @@
|
||||
"description": "JavaScript library for mobile-friendly interactive maps",
|
||||
"devDependencies": {
|
||||
"copyfiles": "0.1.0",
|
||||
"eslint": "^0.13.0",
|
||||
"eslint": "^0.15.1",
|
||||
"happen": "~0.1.3",
|
||||
"jake": "~8.0.10",
|
||||
"karma": "~0.12.31",
|
||||
|
@ -134,8 +134,8 @@ L.Evented = L.Class.extend({
|
||||
events = this._events;
|
||||
|
||||
if (events) {
|
||||
var typeIndex = events[type + '_idx'],
|
||||
i, len, listeners, id;
|
||||
var typeIndex = events[type + '_idx'],
|
||||
i, len, listeners, id;
|
||||
|
||||
if (events[type]) {
|
||||
// make sure adding/removing listeners inside other listeners won't cause infinite loop
|
||||
|
@ -114,7 +114,7 @@ L.Canvas = L.Renderer.extend({
|
||||
len = parts.length,
|
||||
ctx = this._ctx;
|
||||
|
||||
if (!len) { return; }
|
||||
if (!len) { return; }
|
||||
|
||||
ctx.beginPath();
|
||||
|
||||
|
@ -35,14 +35,14 @@ L.Map.Keyboard = L.Handler.extend({
|
||||
}
|
||||
|
||||
L.DomEvent.on(container, {
|
||||
focus: this._onFocus,
|
||||
blur: this._onBlur,
|
||||
mousedown: this._onMouseDown
|
||||
focus: this._onFocus,
|
||||
blur: this._onBlur,
|
||||
mousedown: this._onMouseDown
|
||||
}, this);
|
||||
|
||||
this._map.on({
|
||||
focus: this._addHooks,
|
||||
blur: this._removeHooks
|
||||
blur: this._removeHooks
|
||||
}, this);
|
||||
},
|
||||
|
||||
@ -50,14 +50,14 @@ L.Map.Keyboard = L.Handler.extend({
|
||||
this._removeHooks();
|
||||
|
||||
L.DomEvent.off(this._map._container, {
|
||||
focus: this._onFocus,
|
||||
blur: this._onBlur,
|
||||
mousedown: this._onMouseDown
|
||||
focus: this._onFocus,
|
||||
blur: this._onBlur,
|
||||
mousedown: this._onMouseDown
|
||||
}, this);
|
||||
|
||||
this._map.off({
|
||||
focus: this._addHooks,
|
||||
blur: this._removeHooks
|
||||
blur: this._removeHooks
|
||||
}, this);
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user