Fix linting issues
This commit is contained in:
@@ -150,7 +150,7 @@ if (ol.ENABLE_WEBGL) {
|
||||
this.originY = charInfo.offsetY;
|
||||
this.height = glyphAtlas.height;
|
||||
this.width = j === 0 || j === charArr.length - 1 ?
|
||||
glyphAtlas.width[charArr[j]] + lineWidth : glyphAtlas.width[charArr[j]];
|
||||
glyphAtlas.width[charArr[j]] + lineWidth : glyphAtlas.width[charArr[j]];
|
||||
this.imageHeight = image.height;
|
||||
this.imageWidth = image.width;
|
||||
|
||||
@@ -330,7 +330,7 @@ if (ol.ENABLE_WEBGL) {
|
||||
} else {
|
||||
var textFillStyleColor = textFillStyle.getColor();
|
||||
state.fillColor = ol.colorlike.asColorLike(textFillStyleColor ?
|
||||
textFillStyleColor : ol.render.webgl.defaultFillStyle);
|
||||
textFillStyleColor : ol.render.webgl.defaultFillStyle);
|
||||
}
|
||||
if (!textStrokeStyle) {
|
||||
state.strokeColor = null;
|
||||
@@ -338,7 +338,7 @@ if (ol.ENABLE_WEBGL) {
|
||||
} else {
|
||||
var textStrokeStyleColor = textStrokeStyle.getColor();
|
||||
state.strokeColor = ol.colorlike.asColorLike(textStrokeStyleColor ?
|
||||
textStrokeStyleColor : ol.render.webgl.defaultStrokeStyle);
|
||||
textStrokeStyleColor : ol.render.webgl.defaultStrokeStyle);
|
||||
state.lineWidth = textStrokeStyle.getWidth() || ol.render.webgl.defaultLineWidth;
|
||||
state.lineCap = textStrokeStyle.getLineCap() || ol.render.webgl.defaultLineCap;
|
||||
state.lineDashOffset = textStrokeStyle.getLineDashOffset() || ol.render.webgl.defaultLineDashOffset;
|
||||
@@ -353,9 +353,9 @@ if (ol.ENABLE_WEBGL) {
|
||||
var textAlign = ol.render.webgl.TextReplay.Align_[textStyle.getTextAlign()];
|
||||
var textBaseline = ol.render.webgl.TextReplay.Align_[textStyle.getTextBaseline()];
|
||||
this.textAlign_ = textAlign === undefined ?
|
||||
ol.render.webgl.defaultTextAlign : textAlign;
|
||||
ol.render.webgl.defaultTextAlign : textAlign;
|
||||
this.textBaseline_ = textBaseline === undefined ?
|
||||
ol.render.webgl.defaultTextBaseline : textBaseline;
|
||||
ol.render.webgl.defaultTextBaseline : textBaseline;
|
||||
this.offsetX_ = textStyle.getOffsetX() || 0;
|
||||
this.offsetY_ = textStyle.getOffsetY() || 0;
|
||||
this.rotateWithView = !!textStyle.getRotateWithView();
|
||||
|
||||
@@ -397,12 +397,12 @@ if (ol.ENABLE_WEBGL) {
|
||||
}
|
||||
// continue with the next feature
|
||||
start = (featureIndex === this.startIndices.length - 1) ?
|
||||
groupEnd : this.startIndices[featureIndex + 1];
|
||||
groupEnd : this.startIndices[featureIndex + 1];
|
||||
end = start;
|
||||
} else {
|
||||
// the feature is not skipped, augment the end index
|
||||
end = (featureIndex === this.startIndices.length - 1) ?
|
||||
groupEnd : this.startIndices[featureIndex + 1];
|
||||
groupEnd : this.startIndices[featureIndex + 1];
|
||||
}
|
||||
featureIndex++;
|
||||
}
|
||||
|
||||
@@ -38,39 +38,39 @@ describe('ol.render.webgl.TextReplay', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
textStyle1 = createTextStyle(
|
||||
new ol.style.Fill({
|
||||
color: [0, 0, 0, 1]
|
||||
}),
|
||||
new ol.style.Stroke({
|
||||
width: 1,
|
||||
color: [0, 0, 0, 1],
|
||||
lineCap: 'butt',
|
||||
lineJoin: 'bevel',
|
||||
lineDash: [5, 5],
|
||||
lineDashOffset: 15,
|
||||
miterLimit: 2
|
||||
}),
|
||||
'someText');
|
||||
new ol.style.Fill({
|
||||
color: [0, 0, 0, 1]
|
||||
}),
|
||||
new ol.style.Stroke({
|
||||
width: 1,
|
||||
color: [0, 0, 0, 1],
|
||||
lineCap: 'butt',
|
||||
lineJoin: 'bevel',
|
||||
lineDash: [5, 5],
|
||||
lineDashOffset: 15,
|
||||
miterLimit: 2
|
||||
}),
|
||||
'someText');
|
||||
textStyle2 = createTextStyle(
|
||||
new ol.style.Fill({
|
||||
color: [255, 255, 255, 1]
|
||||
}),
|
||||
new ol.style.Stroke({
|
||||
width: 1,
|
||||
color: [255, 255, 255, 1]
|
||||
}),
|
||||
'someText'
|
||||
new ol.style.Fill({
|
||||
color: [255, 255, 255, 1]
|
||||
}),
|
||||
new ol.style.Stroke({
|
||||
width: 1,
|
||||
color: [255, 255, 255, 1]
|
||||
}),
|
||||
'someText'
|
||||
);
|
||||
textStyle3 = createTextStyle(null, null, 'someText');
|
||||
textStyle4 = createTextStyle(
|
||||
new ol.style.Fill({
|
||||
color: [0, 0, 0, 1]
|
||||
}),
|
||||
new ol.style.Stroke({
|
||||
width: 1,
|
||||
color: [0, 0, 0, 1]
|
||||
}),
|
||||
''
|
||||
new ol.style.Fill({
|
||||
color: [0, 0, 0, 1]
|
||||
}),
|
||||
new ol.style.Stroke({
|
||||
width: 1,
|
||||
color: [0, 0, 0, 1]
|
||||
}),
|
||||
''
|
||||
);
|
||||
});
|
||||
|
||||
@@ -116,10 +116,10 @@ describe('ol.render.webgl.TextReplay', function() {
|
||||
describe('#drawText', function() {
|
||||
beforeEach(function() {
|
||||
var textStyle = createTextStyle(
|
||||
new ol.style.Fill({
|
||||
color: [0, 0, 0, 1]
|
||||
}),
|
||||
null, 'someText');
|
||||
new ol.style.Fill({
|
||||
color: [0, 0, 0, 1]
|
||||
}),
|
||||
null, 'someText');
|
||||
replay.setTextStyle(textStyle);
|
||||
});
|
||||
|
||||
@@ -172,10 +172,10 @@ describe('ol.render.webgl.TextReplay', function() {
|
||||
describe('#addCharToAtlas_', function() {
|
||||
beforeEach(function() {
|
||||
var textStyle = createTextStyle(
|
||||
new ol.style.Fill({
|
||||
color: [0, 0, 0, 1]
|
||||
}),
|
||||
null, 'someText');
|
||||
new ol.style.Fill({
|
||||
color: [0, 0, 0, 1]
|
||||
}),
|
||||
null, 'someText');
|
||||
replay.setTextStyle(textStyle);
|
||||
});
|
||||
|
||||
@@ -210,10 +210,10 @@ describe('ol.render.webgl.TextReplay', function() {
|
||||
describe('#getTextSize_', function() {
|
||||
beforeEach(function() {
|
||||
var textStyle = createTextStyle(
|
||||
new ol.style.Fill({
|
||||
color: [0, 0, 0, 1]
|
||||
}),
|
||||
null, 'someText');
|
||||
new ol.style.Fill({
|
||||
color: [0, 0, 0, 1]
|
||||
}),
|
||||
null, 'someText');
|
||||
textStyle.setScale(1);
|
||||
replay.setTextStyle(textStyle);
|
||||
});
|
||||
@@ -262,10 +262,10 @@ describe('ol.render.webgl.TextReplay', function() {
|
||||
describe('#getAtlas_', function() {
|
||||
beforeEach(function() {
|
||||
var textStyle = createTextStyle(
|
||||
new ol.style.Fill({
|
||||
color: [0, 0, 0, 1]
|
||||
}),
|
||||
null, 'someText');
|
||||
new ol.style.Fill({
|
||||
color: [0, 0, 0, 1]
|
||||
}),
|
||||
null, 'someText');
|
||||
replay.setTextStyle(textStyle);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user