Autofix indentation issues (eslint --fix)
This commit is contained in:
@@ -31,7 +31,7 @@ ol.style.AtlasManager = function(opt_options) {
|
||||
* @type {number}
|
||||
*/
|
||||
this.currentSize_ = options.initialSize !== undefined ?
|
||||
options.initialSize : ol.INITIAL_ATLAS_SIZE;
|
||||
options.initialSize : ol.INITIAL_ATLAS_SIZE;
|
||||
|
||||
/**
|
||||
* The maximum size in pixels of atlas images.
|
||||
@@ -39,9 +39,9 @@ ol.style.AtlasManager = function(opt_options) {
|
||||
* @type {number}
|
||||
*/
|
||||
this.maxSize_ = options.maxSize !== undefined ?
|
||||
options.maxSize : ol.MAX_ATLAS_SIZE != -1 ?
|
||||
ol.MAX_ATLAS_SIZE : ol.WEBGL_MAX_TEXTURE_SIZE !== undefined ?
|
||||
ol.WEBGL_MAX_TEXTURE_SIZE : 2048;
|
||||
options.maxSize : ol.MAX_ATLAS_SIZE != -1 ?
|
||||
ol.MAX_ATLAS_SIZE : ol.WEBGL_MAX_TEXTURE_SIZE !== undefined ?
|
||||
ol.WEBGL_MAX_TEXTURE_SIZE : 2048;
|
||||
|
||||
/**
|
||||
* The size in pixels between images.
|
||||
@@ -150,7 +150,7 @@ ol.style.AtlasManager.prototype.mergeInfos_ = function(info, hitInfo) {
|
||||
* entry, or `null` if the image is too big.
|
||||
*/
|
||||
ol.style.AtlasManager.prototype.add = function(id, width, height,
|
||||
renderCallback, opt_renderHitCallback, opt_this) {
|
||||
renderCallback, opt_renderHitCallback, opt_this) {
|
||||
if (width + this.space_ > this.maxSize_ ||
|
||||
height + this.space_ > this.maxSize_) {
|
||||
return null;
|
||||
@@ -167,7 +167,7 @@ ol.style.AtlasManager.prototype.add = function(id, width, height,
|
||||
// the hit-detection atlas, to make sure that the offset is the same for
|
||||
// the original image and the hit-detection image.
|
||||
var renderHitCallback = opt_renderHitCallback !== undefined ?
|
||||
opt_renderHitCallback : ol.nullFunction;
|
||||
opt_renderHitCallback : ol.nullFunction;
|
||||
|
||||
var hitInfo = /** @type {ol.AtlasInfo} */ (this.add_(true,
|
||||
id, width, height, renderHitCallback, opt_this));
|
||||
@@ -190,7 +190,7 @@ ol.style.AtlasManager.prototype.add = function(id, width, height,
|
||||
* or `null` if the image is too big.
|
||||
*/
|
||||
ol.style.AtlasManager.prototype.add_ = function(isHitAtlas, id, width, height,
|
||||
renderCallback, opt_this) {
|
||||
renderCallback, opt_this) {
|
||||
var atlases = (isHitAtlas) ? this.hitAtlases_ : this.atlases_;
|
||||
var atlas, info, i, ii;
|
||||
for (i = 0, ii = atlases.length; i < ii; ++i) {
|
||||
|
||||
@@ -71,13 +71,13 @@ ol.style.Fill.prototype.setColor = function(color) {
|
||||
ol.style.Fill.prototype.getChecksum = function() {
|
||||
if (this.checksum_ === undefined) {
|
||||
if (
|
||||
this.color_ instanceof CanvasPattern ||
|
||||
this.color_ instanceof CanvasPattern ||
|
||||
this.color_ instanceof CanvasGradient
|
||||
) {
|
||||
this.checksum_ = ol.getUid(this.color_).toString();
|
||||
} else {
|
||||
this.checksum_ = 'f' + (this.color_ ?
|
||||
ol.color.asString(this.color_) : '-');
|
||||
ol.color.asString(this.color_) : '-');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,21 +42,21 @@ ol.style.Icon = function(opt_options) {
|
||||
* @type {ol.style.IconOrigin}
|
||||
*/
|
||||
this.anchorOrigin_ = options.anchorOrigin !== undefined ?
|
||||
options.anchorOrigin : ol.style.IconOrigin.TOP_LEFT;
|
||||
options.anchorOrigin : ol.style.IconOrigin.TOP_LEFT;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.style.IconAnchorUnits}
|
||||
*/
|
||||
this.anchorXUnits_ = options.anchorXUnits !== undefined ?
|
||||
options.anchorXUnits : ol.style.IconAnchorUnits.FRACTION;
|
||||
options.anchorXUnits : ol.style.IconAnchorUnits.FRACTION;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.style.IconAnchorUnits}
|
||||
*/
|
||||
this.anchorYUnits_ = options.anchorYUnits !== undefined ?
|
||||
options.anchorYUnits : ol.style.IconAnchorUnits.FRACTION;
|
||||
options.anchorYUnits : ol.style.IconAnchorUnits.FRACTION;
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -95,14 +95,14 @@ ol.style.Icon = function(opt_options) {
|
||||
* @type {ol.ImageState}
|
||||
*/
|
||||
var imageState = options.src !== undefined ?
|
||||
ol.ImageState.IDLE : ol.ImageState.LOADED;
|
||||
ol.ImageState.IDLE : ol.ImageState.LOADED;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.Color}
|
||||
*/
|
||||
this.color_ = options.color !== undefined ? ol.color.asArray(options.color) :
|
||||
null;
|
||||
null;
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -122,7 +122,7 @@ ol.style.Icon = function(opt_options) {
|
||||
* @type {ol.style.IconOrigin}
|
||||
*/
|
||||
this.offsetOrigin_ = options.offsetOrigin !== undefined ?
|
||||
options.offsetOrigin : ol.style.IconOrigin.TOP_LEFT;
|
||||
options.offsetOrigin : ol.style.IconOrigin.TOP_LEFT;
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -145,7 +145,7 @@ ol.style.Icon = function(opt_options) {
|
||||
* @type {boolean}
|
||||
*/
|
||||
var rotateWithView = options.rotateWithView !== undefined ?
|
||||
options.rotateWithView : false;
|
||||
options.rotateWithView : false;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
@@ -161,7 +161,7 @@ ol.style.Icon = function(opt_options) {
|
||||
* @type {boolean}
|
||||
*/
|
||||
var snapToPixel = options.snapToPixel !== undefined ?
|
||||
options.snapToPixel : true;
|
||||
options.snapToPixel : true;
|
||||
|
||||
ol.style.Image.call(this, {
|
||||
opacity: opacity,
|
||||
|
||||
@@ -20,7 +20,7 @@ goog.require('ol.style');
|
||||
* @extends {ol.events.EventTarget}
|
||||
*/
|
||||
ol.style.IconImage = function(image, src, size, crossOrigin, imageState,
|
||||
color) {
|
||||
color) {
|
||||
|
||||
ol.events.EventTarget.call(this);
|
||||
|
||||
@@ -45,8 +45,8 @@ ol.style.IconImage = function(image, src, size, crossOrigin, imageState,
|
||||
* @type {HTMLCanvasElement}
|
||||
*/
|
||||
this.canvas_ = color ?
|
||||
/** @type {HTMLCanvasElement} */ (document.createElement('CANVAS')) :
|
||||
null;
|
||||
/** @type {HTMLCanvasElement} */ (document.createElement('CANVAS')) :
|
||||
null;
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -101,7 +101,7 @@ ol.inherits(ol.style.IconImage, ol.events.EventTarget);
|
||||
* @return {ol.style.IconImage} Icon image.
|
||||
*/
|
||||
ol.style.IconImage.get = function(image, src, size, crossOrigin, imageState,
|
||||
color) {
|
||||
color) {
|
||||
var iconImageCache = ol.style.iconImageCache;
|
||||
var iconImage = iconImageCache.get(src, crossOrigin, color);
|
||||
if (!iconImage) {
|
||||
|
||||
@@ -62,7 +62,7 @@ ol.style.RegularShape = function(options) {
|
||||
* @type {number}
|
||||
*/
|
||||
this.radius_ = /** @type {number} */ (options.radius !== undefined ?
|
||||
options.radius : options.radius1);
|
||||
options.radius : options.radius1);
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -118,13 +118,13 @@ ol.style.RegularShape = function(options) {
|
||||
* @type {boolean}
|
||||
*/
|
||||
var snapToPixel = options.snapToPixel !== undefined ?
|
||||
options.snapToPixel : true;
|
||||
options.snapToPixel : true;
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
var rotateWithView = options.rotateWithView !== undefined ?
|
||||
options.rotateWithView : false;
|
||||
options.rotateWithView : false;
|
||||
|
||||
ol.style.Image.call(this, {
|
||||
opacity: 1,
|
||||
@@ -442,7 +442,7 @@ ol.style.RegularShape.prototype.draw_ = function(renderOptions, context, x, y) {
|
||||
angle0 = i * 2 * Math.PI / points - Math.PI / 2 + this.angle_;
|
||||
radiusC = i % 2 === 0 ? this.radius_ : radius2;
|
||||
context.lineTo(renderOptions.size / 2 + radiusC * Math.cos(angle0),
|
||||
renderOptions.size / 2 + radiusC * Math.sin(angle0));
|
||||
renderOptions.size / 2 + radiusC * Math.sin(angle0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -522,7 +522,7 @@ ol.style.RegularShape.prototype.drawHitDetectionCanvas_ = function(renderOptions
|
||||
angle0 = i * 2 * Math.PI / points - Math.PI / 2 + this.angle_;
|
||||
radiusC = i % 2 === 0 ? this.radius_ : radius2;
|
||||
context.lineTo(renderOptions.size / 2 + radiusC * Math.cos(angle0),
|
||||
renderOptions.size / 2 + radiusC * Math.sin(angle0));
|
||||
renderOptions.size / 2 + radiusC * Math.sin(angle0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -545,9 +545,9 @@ ol.style.RegularShape.prototype.drawHitDetectionCanvas_ = function(renderOptions
|
||||
*/
|
||||
ol.style.RegularShape.prototype.getChecksum = function() {
|
||||
var strokeChecksum = this.stroke_ ?
|
||||
this.stroke_.getChecksum() : '-';
|
||||
this.stroke_.getChecksum() : '-';
|
||||
var fillChecksum = this.fill_ ?
|
||||
this.fill_.getChecksum() : '-';
|
||||
this.fill_.getChecksum() : '-';
|
||||
|
||||
var recalculate = !this.checksums_ ||
|
||||
(strokeChecksum != this.checksums_[1] ||
|
||||
|
||||
@@ -264,17 +264,17 @@ ol.style.Stroke.prototype.getChecksum = function() {
|
||||
}
|
||||
this.checksum_ += ',' +
|
||||
(this.lineCap_ !== undefined ?
|
||||
this.lineCap_.toString() : '-') + ',' +
|
||||
this.lineCap_.toString() : '-') + ',' +
|
||||
(this.lineDash_ ?
|
||||
this.lineDash_.toString() : '-') + ',' +
|
||||
this.lineDash_.toString() : '-') + ',' +
|
||||
(this.lineDashOffset_ !== undefined ?
|
||||
this.lineDashOffset_ : '-') + ',' +
|
||||
this.lineDashOffset_ : '-') + ',' +
|
||||
(this.lineJoin_ !== undefined ?
|
||||
this.lineJoin_ : '-') + ',' +
|
||||
this.lineJoin_ : '-') + ',' +
|
||||
(this.miterLimit_ !== undefined ?
|
||||
this.miterLimit_.toString() : '-') + ',' +
|
||||
this.miterLimit_.toString() : '-') + ',' +
|
||||
(this.width_ !== undefined ?
|
||||
this.width_.toString() : '-');
|
||||
this.width_.toString() : '-');
|
||||
}
|
||||
|
||||
return this.checksum_;
|
||||
|
||||
@@ -63,7 +63,7 @@ ol.style.Text = function(opt_options) {
|
||||
* @type {ol.style.Fill}
|
||||
*/
|
||||
this.fill_ = options.fill !== undefined ? options.fill :
|
||||
new ol.style.Fill({color: ol.style.Text.DEFAULT_FILL_COLOR_});
|
||||
new ol.style.Fill({color: ol.style.Text.DEFAULT_FILL_COLOR_});
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
||||
Reference in New Issue
Block a user