Lint removal

This commit is contained in:
Tim Schaub
2018-07-16 17:57:57 -06:00
parent f78d0d4cfa
commit d0ab8dce38
63 changed files with 2945 additions and 2917 deletions

View File

@@ -32,57 +32,57 @@ import {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';
* @api
*/
class ZoomToExtent {
constructor(opt_options) {
const options = opt_options ? opt_options : {};
constructor(opt_options) {
const options = opt_options ? opt_options : {};
/**
/**
* @type {module:ol/extent~Extent}
* @protected
*/
this.extent = options.extent ? options.extent : null;
this.extent = options.extent ? options.extent : null;
const className = options.className !== undefined ? options.className : 'ol-zoom-extent';
const className = options.className !== undefined ? options.className : 'ol-zoom-extent';
const label = options.label !== undefined ? options.label : 'E';
const tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Fit to extent';
const button = document.createElement('button');
button.setAttribute('type', 'button');
button.title = tipLabel;
button.appendChild(
typeof label === 'string' ? document.createTextNode(label) : label
);
const label = options.label !== undefined ? options.label : 'E';
const tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Fit to extent';
const button = document.createElement('button');
button.setAttribute('type', 'button');
button.title = tipLabel;
button.appendChild(
typeof label === 'string' ? document.createTextNode(label) : label
);
listen(button, EventType.CLICK, this.handleClick_, this);
listen(button, EventType.CLICK, this.handleClick_, this);
const cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;
const element = document.createElement('div');
element.className = cssClasses;
element.appendChild(button);
const cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;
const element = document.createElement('div');
element.className = cssClasses;
element.appendChild(button);
Control.call(this, {
element: element,
target: options.target
});
}
Control.call(this, {
element: element,
target: options.target
});
}
/**
/**
* @param {MouseEvent} event The event to handle
* @private
*/
handleClick_(event) {
event.preventDefault();
this.handleZoomToExtent();
}
handleClick_(event) {
event.preventDefault();
this.handleZoomToExtent();
}
/**
/**
* @protected
*/
handleZoomToExtent() {
const map = this.getMap();
const view = map.getView();
const extent = !this.extent ? view.getProjection().getExtent() : this.extent;
view.fit(extent);
}
handleZoomToExtent() {
const map = this.getMap();
const view = map.getView();
const extent = !this.extent ? view.getProjection().getExtent() : this.extent;
view.fit(extent);
}
}
inherits(ZoomToExtent, Control);