Autofix indentation issues (eslint --fix)
This commit is contained in:
@@ -125,10 +125,10 @@ ol.render.canvas.ImageReplay.prototype.drawPoint = function(pointGeometry, featu
|
||||
var stride = pointGeometry.getStride();
|
||||
var myBegin = this.coordinates.length;
|
||||
var myEnd = this.drawCoordinates_(
|
||||
flatCoordinates, 0, flatCoordinates.length, stride);
|
||||
flatCoordinates, 0, flatCoordinates.length, stride);
|
||||
this.instructions.push([
|
||||
ol.render.canvas.Instruction.DRAW_IMAGE, myBegin, myEnd, this.image_,
|
||||
// Remaining arguments to DRAW_IMAGE are in alphabetical order
|
||||
// Remaining arguments to DRAW_IMAGE are in alphabetical order
|
||||
this.anchorX_, this.anchorY_, this.height_, this.opacity_,
|
||||
this.originX_, this.originY_, this.rotateWithView_, this.rotation_,
|
||||
this.scale_, this.snapToPixel_, this.width_
|
||||
@@ -136,7 +136,7 @@ ol.render.canvas.ImageReplay.prototype.drawPoint = function(pointGeometry, featu
|
||||
this.hitDetectionInstructions.push([
|
||||
ol.render.canvas.Instruction.DRAW_IMAGE, myBegin, myEnd,
|
||||
this.hitDetectionImage_,
|
||||
// Remaining arguments to DRAW_IMAGE are in alphabetical order
|
||||
// Remaining arguments to DRAW_IMAGE are in alphabetical order
|
||||
this.anchorX_, this.anchorY_, this.height_, this.opacity_,
|
||||
this.originX_, this.originY_, this.rotateWithView_, this.rotation_,
|
||||
this.scale_, this.snapToPixel_, this.width_
|
||||
@@ -157,10 +157,10 @@ ol.render.canvas.ImageReplay.prototype.drawMultiPoint = function(multiPointGeome
|
||||
var stride = multiPointGeometry.getStride();
|
||||
var myBegin = this.coordinates.length;
|
||||
var myEnd = this.drawCoordinates_(
|
||||
flatCoordinates, 0, flatCoordinates.length, stride);
|
||||
flatCoordinates, 0, flatCoordinates.length, stride);
|
||||
this.instructions.push([
|
||||
ol.render.canvas.Instruction.DRAW_IMAGE, myBegin, myEnd, this.image_,
|
||||
// Remaining arguments to DRAW_IMAGE are in alphabetical order
|
||||
// Remaining arguments to DRAW_IMAGE are in alphabetical order
|
||||
this.anchorX_, this.anchorY_, this.height_, this.opacity_,
|
||||
this.originX_, this.originY_, this.rotateWithView_, this.rotation_,
|
||||
this.scale_, this.snapToPixel_, this.width_
|
||||
@@ -168,7 +168,7 @@ ol.render.canvas.ImageReplay.prototype.drawMultiPoint = function(multiPointGeome
|
||||
this.hitDetectionInstructions.push([
|
||||
ol.render.canvas.Instruction.DRAW_IMAGE, myBegin, myEnd,
|
||||
this.hitDetectionImage_,
|
||||
// Remaining arguments to DRAW_IMAGE are in alphabetical order
|
||||
// Remaining arguments to DRAW_IMAGE are in alphabetical order
|
||||
this.anchorX_, this.anchorY_, this.height_, this.opacity_,
|
||||
this.originX_, this.originY_, this.rotateWithView_, this.rotation_,
|
||||
this.scale_, this.snapToPixel_, this.width_
|
||||
|
||||
@@ -822,7 +822,7 @@ ol.render.canvas.Immediate.prototype.setFillStrokeStyle = function(fillStyle, st
|
||||
var fillStyleColor = fillStyle.getColor();
|
||||
this.fillState_ = {
|
||||
fillStyle: ol.colorlike.asColorLike(fillStyleColor ?
|
||||
fillStyleColor : ol.render.canvas.defaultFillStyle)
|
||||
fillStyleColor : ol.render.canvas.defaultFillStyle)
|
||||
};
|
||||
}
|
||||
if (!strokeStyle) {
|
||||
@@ -837,19 +837,19 @@ ol.render.canvas.Immediate.prototype.setFillStrokeStyle = function(fillStyle, st
|
||||
var strokeStyleMiterLimit = strokeStyle.getMiterLimit();
|
||||
this.strokeState_ = {
|
||||
lineCap: strokeStyleLineCap !== undefined ?
|
||||
strokeStyleLineCap : ol.render.canvas.defaultLineCap,
|
||||
strokeStyleLineCap : ol.render.canvas.defaultLineCap,
|
||||
lineDash: strokeStyleLineDash ?
|
||||
strokeStyleLineDash : ol.render.canvas.defaultLineDash,
|
||||
strokeStyleLineDash : ol.render.canvas.defaultLineDash,
|
||||
lineDashOffset: strokeStyleLineDashOffset ?
|
||||
strokeStyleLineDashOffset : ol.render.canvas.defaultLineDashOffset,
|
||||
strokeStyleLineDashOffset : ol.render.canvas.defaultLineDashOffset,
|
||||
lineJoin: strokeStyleLineJoin !== undefined ?
|
||||
strokeStyleLineJoin : ol.render.canvas.defaultLineJoin,
|
||||
strokeStyleLineJoin : ol.render.canvas.defaultLineJoin,
|
||||
lineWidth: this.pixelRatio_ * (strokeStyleWidth !== undefined ?
|
||||
strokeStyleWidth : ol.render.canvas.defaultLineWidth),
|
||||
strokeStyleWidth : ol.render.canvas.defaultLineWidth),
|
||||
miterLimit: strokeStyleMiterLimit !== undefined ?
|
||||
strokeStyleMiterLimit : ol.render.canvas.defaultMiterLimit,
|
||||
strokeStyleMiterLimit : ol.render.canvas.defaultMiterLimit,
|
||||
strokeStyle: ol.colorlike.asColorLike(strokeStyleColor ?
|
||||
strokeStyleColor : ol.render.canvas.defaultStrokeStyle)
|
||||
strokeStyleColor : ol.render.canvas.defaultStrokeStyle)
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -905,7 +905,7 @@ ol.render.canvas.Immediate.prototype.setTextStyle = function(textStyle) {
|
||||
var textFillStyleColor = textFillStyle.getColor();
|
||||
this.textFillState_ = {
|
||||
fillStyle: ol.colorlike.asColorLike(textFillStyleColor ?
|
||||
textFillStyleColor : ol.render.canvas.defaultFillStyle)
|
||||
textFillStyleColor : ol.render.canvas.defaultFillStyle)
|
||||
};
|
||||
}
|
||||
var textStrokeStyle = textStyle.getStroke();
|
||||
@@ -921,19 +921,19 @@ ol.render.canvas.Immediate.prototype.setTextStyle = function(textStyle) {
|
||||
var textStrokeStyleMiterLimit = textStrokeStyle.getMiterLimit();
|
||||
this.textStrokeState_ = {
|
||||
lineCap: textStrokeStyleLineCap !== undefined ?
|
||||
textStrokeStyleLineCap : ol.render.canvas.defaultLineCap,
|
||||
textStrokeStyleLineCap : ol.render.canvas.defaultLineCap,
|
||||
lineDash: textStrokeStyleLineDash ?
|
||||
textStrokeStyleLineDash : ol.render.canvas.defaultLineDash,
|
||||
textStrokeStyleLineDash : ol.render.canvas.defaultLineDash,
|
||||
lineDashOffset: textStrokeStyleLineDashOffset ?
|
||||
textStrokeStyleLineDashOffset : ol.render.canvas.defaultLineDashOffset,
|
||||
textStrokeStyleLineDashOffset : ol.render.canvas.defaultLineDashOffset,
|
||||
lineJoin: textStrokeStyleLineJoin !== undefined ?
|
||||
textStrokeStyleLineJoin : ol.render.canvas.defaultLineJoin,
|
||||
textStrokeStyleLineJoin : ol.render.canvas.defaultLineJoin,
|
||||
lineWidth: textStrokeStyleWidth !== undefined ?
|
||||
textStrokeStyleWidth : ol.render.canvas.defaultLineWidth,
|
||||
textStrokeStyleWidth : ol.render.canvas.defaultLineWidth,
|
||||
miterLimit: textStrokeStyleMiterLimit !== undefined ?
|
||||
textStrokeStyleMiterLimit : ol.render.canvas.defaultMiterLimit,
|
||||
textStrokeStyleMiterLimit : ol.render.canvas.defaultMiterLimit,
|
||||
strokeStyle: ol.colorlike.asColorLike(textStrokeStyleColor ?
|
||||
textStrokeStyleColor : ol.render.canvas.defaultStrokeStyle)
|
||||
textStrokeStyleColor : ol.render.canvas.defaultStrokeStyle)
|
||||
};
|
||||
}
|
||||
var textFont = textStyle.getFont();
|
||||
@@ -947,11 +947,11 @@ ol.render.canvas.Immediate.prototype.setTextStyle = function(textStyle) {
|
||||
var textTextBaseline = textStyle.getTextBaseline();
|
||||
this.textState_ = {
|
||||
font: textFont !== undefined ?
|
||||
textFont : ol.render.canvas.defaultFont,
|
||||
textFont : ol.render.canvas.defaultFont,
|
||||
textAlign: textTextAlign !== undefined ?
|
||||
textTextAlign : ol.render.canvas.defaultTextAlign,
|
||||
textTextAlign : ol.render.canvas.defaultTextAlign,
|
||||
textBaseline: textTextBaseline !== undefined ?
|
||||
textTextBaseline : ol.render.canvas.defaultTextBaseline
|
||||
textTextBaseline : ol.render.canvas.defaultTextBaseline
|
||||
};
|
||||
this.text_ = textText !== undefined ? textText : '';
|
||||
this.textOffsetX_ =
|
||||
@@ -961,6 +961,6 @@ ol.render.canvas.Immediate.prototype.setTextStyle = function(textStyle) {
|
||||
this.textRotateWithView_ = textRotateWithView !== undefined ? textRotateWithView : false;
|
||||
this.textRotation_ = textRotation !== undefined ? textRotation : 0;
|
||||
this.textScale_ = this.pixelRatio_ * (textScale !== undefined ?
|
||||
textScale : 1);
|
||||
textScale : 1);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -222,25 +222,25 @@ ol.render.canvas.LineStringReplay.prototype.finish = function() {
|
||||
ol.render.canvas.LineStringReplay.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
|
||||
var strokeStyleColor = strokeStyle.getColor();
|
||||
this.state_.strokeStyle = ol.colorlike.asColorLike(strokeStyleColor ?
|
||||
strokeStyleColor : ol.render.canvas.defaultStrokeStyle);
|
||||
strokeStyleColor : ol.render.canvas.defaultStrokeStyle);
|
||||
var strokeStyleLineCap = strokeStyle.getLineCap();
|
||||
this.state_.lineCap = strokeStyleLineCap !== undefined ?
|
||||
strokeStyleLineCap : ol.render.canvas.defaultLineCap;
|
||||
strokeStyleLineCap : ol.render.canvas.defaultLineCap;
|
||||
var strokeStyleLineDash = strokeStyle.getLineDash();
|
||||
this.state_.lineDash = strokeStyleLineDash ?
|
||||
strokeStyleLineDash : ol.render.canvas.defaultLineDash;
|
||||
strokeStyleLineDash : ol.render.canvas.defaultLineDash;
|
||||
var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();
|
||||
this.state_.lineDashOffset = strokeStyleLineDashOffset ?
|
||||
strokeStyleLineDashOffset : ol.render.canvas.defaultLineDashOffset;
|
||||
strokeStyleLineDashOffset : ol.render.canvas.defaultLineDashOffset;
|
||||
var strokeStyleLineJoin = strokeStyle.getLineJoin();
|
||||
this.state_.lineJoin = strokeStyleLineJoin !== undefined ?
|
||||
strokeStyleLineJoin : ol.render.canvas.defaultLineJoin;
|
||||
strokeStyleLineJoin : ol.render.canvas.defaultLineJoin;
|
||||
var strokeStyleWidth = strokeStyle.getWidth();
|
||||
this.state_.lineWidth = strokeStyleWidth !== undefined ?
|
||||
strokeStyleWidth : ol.render.canvas.defaultLineWidth;
|
||||
strokeStyleWidth : ol.render.canvas.defaultLineWidth;
|
||||
var strokeStyleMiterLimit = strokeStyle.getMiterLimit();
|
||||
this.state_.miterLimit = strokeStyleMiterLimit !== undefined ?
|
||||
strokeStyleMiterLimit : ol.render.canvas.defaultMiterLimit;
|
||||
strokeStyleMiterLimit : ol.render.canvas.defaultMiterLimit;
|
||||
|
||||
if (this.state_.lineWidth > this.maxLineWidth) {
|
||||
this.maxLineWidth = this.state_.lineWidth;
|
||||
|
||||
@@ -178,7 +178,7 @@ ol.render.canvas.PolygonReplay.prototype.drawPolygon = function(polygonGeometry,
|
||||
this.hitDetectionInstructions.push([
|
||||
ol.render.canvas.Instruction.SET_FILL_STYLE,
|
||||
ol.color.asString(ol.render.canvas.defaultFillStyle)]
|
||||
);
|
||||
);
|
||||
if (state.strokeStyle !== undefined) {
|
||||
this.hitDetectionInstructions.push([
|
||||
ol.render.canvas.Instruction.SET_STROKE_STYLE,
|
||||
@@ -275,32 +275,32 @@ ol.render.canvas.PolygonReplay.prototype.setFillStrokeStyle = function(fillStyle
|
||||
if (fillStyle) {
|
||||
var fillStyleColor = fillStyle.getColor();
|
||||
state.fillStyle = ol.colorlike.asColorLike(fillStyleColor ?
|
||||
fillStyleColor : ol.render.canvas.defaultFillStyle);
|
||||
fillStyleColor : ol.render.canvas.defaultFillStyle);
|
||||
} else {
|
||||
state.fillStyle = undefined;
|
||||
}
|
||||
if (strokeStyle) {
|
||||
var strokeStyleColor = strokeStyle.getColor();
|
||||
state.strokeStyle = ol.colorlike.asColorLike(strokeStyleColor ?
|
||||
strokeStyleColor : ol.render.canvas.defaultStrokeStyle);
|
||||
strokeStyleColor : ol.render.canvas.defaultStrokeStyle);
|
||||
var strokeStyleLineCap = strokeStyle.getLineCap();
|
||||
state.lineCap = strokeStyleLineCap !== undefined ?
|
||||
strokeStyleLineCap : ol.render.canvas.defaultLineCap;
|
||||
strokeStyleLineCap : ol.render.canvas.defaultLineCap;
|
||||
var strokeStyleLineDash = strokeStyle.getLineDash();
|
||||
state.lineDash = strokeStyleLineDash ?
|
||||
strokeStyleLineDash.slice() : ol.render.canvas.defaultLineDash;
|
||||
strokeStyleLineDash.slice() : ol.render.canvas.defaultLineDash;
|
||||
var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();
|
||||
state.lineDashOffset = strokeStyleLineDashOffset ?
|
||||
strokeStyleLineDashOffset : ol.render.canvas.defaultLineDashOffset;
|
||||
strokeStyleLineDashOffset : ol.render.canvas.defaultLineDashOffset;
|
||||
var strokeStyleLineJoin = strokeStyle.getLineJoin();
|
||||
state.lineJoin = strokeStyleLineJoin !== undefined ?
|
||||
strokeStyleLineJoin : ol.render.canvas.defaultLineJoin;
|
||||
strokeStyleLineJoin : ol.render.canvas.defaultLineJoin;
|
||||
var strokeStyleWidth = strokeStyle.getWidth();
|
||||
state.lineWidth = strokeStyleWidth !== undefined ?
|
||||
strokeStyleWidth : ol.render.canvas.defaultLineWidth;
|
||||
strokeStyleWidth : ol.render.canvas.defaultLineWidth;
|
||||
var strokeStyleMiterLimit = strokeStyle.getMiterLimit();
|
||||
state.miterLimit = strokeStyleMiterLimit !== undefined ?
|
||||
strokeStyleMiterLimit : ol.render.canvas.defaultMiterLimit;
|
||||
strokeStyleMiterLimit : ol.render.canvas.defaultMiterLimit;
|
||||
|
||||
if (state.lineWidth > this.maxLineWidth) {
|
||||
this.maxLineWidth = state.lineWidth;
|
||||
|
||||
@@ -473,7 +473,7 @@ ol.render.canvas.Replay.prototype.replay_ = function(
|
||||
break;
|
||||
case ol.render.canvas.Instruction.SET_STROKE_STYLE:
|
||||
var usePixelRatio = instruction[8] !== undefined ?
|
||||
instruction[8] : true;
|
||||
instruction[8] : true;
|
||||
var renderedPixelRatio = instruction[9];
|
||||
|
||||
var lineWidth = /** @type {number} */ (instruction[2]);
|
||||
|
||||
@@ -239,7 +239,7 @@ ol.render.canvas.TextReplay.prototype.setTextStyle = function(textStyle) {
|
||||
} else {
|
||||
var textFillStyleColor = textFillStyle.getColor();
|
||||
var fillStyle = ol.colorlike.asColorLike(textFillStyleColor ?
|
||||
textFillStyleColor : ol.render.canvas.defaultFillStyle);
|
||||
textFillStyleColor : ol.render.canvas.defaultFillStyle);
|
||||
if (!this.textFillState_) {
|
||||
this.textFillState_ = {
|
||||
fillStyle: fillStyle
|
||||
@@ -261,19 +261,19 @@ ol.render.canvas.TextReplay.prototype.setTextStyle = function(textStyle) {
|
||||
var textStrokeStyleWidth = textStrokeStyle.getWidth();
|
||||
var textStrokeStyleMiterLimit = textStrokeStyle.getMiterLimit();
|
||||
var lineCap = textStrokeStyleLineCap !== undefined ?
|
||||
textStrokeStyleLineCap : ol.render.canvas.defaultLineCap;
|
||||
textStrokeStyleLineCap : ol.render.canvas.defaultLineCap;
|
||||
var lineDash = textStrokeStyleLineDash ?
|
||||
textStrokeStyleLineDash.slice() : ol.render.canvas.defaultLineDash;
|
||||
textStrokeStyleLineDash.slice() : ol.render.canvas.defaultLineDash;
|
||||
var lineDashOffset = textStrokeStyleLineDashOffset !== undefined ?
|
||||
textStrokeStyleLineDashOffset : ol.render.canvas.defaultLineDashOffset;
|
||||
textStrokeStyleLineDashOffset : ol.render.canvas.defaultLineDashOffset;
|
||||
var lineJoin = textStrokeStyleLineJoin !== undefined ?
|
||||
textStrokeStyleLineJoin : ol.render.canvas.defaultLineJoin;
|
||||
textStrokeStyleLineJoin : ol.render.canvas.defaultLineJoin;
|
||||
var lineWidth = textStrokeStyleWidth !== undefined ?
|
||||
textStrokeStyleWidth : ol.render.canvas.defaultLineWidth;
|
||||
textStrokeStyleWidth : ol.render.canvas.defaultLineWidth;
|
||||
var miterLimit = textStrokeStyleMiterLimit !== undefined ?
|
||||
textStrokeStyleMiterLimit : ol.render.canvas.defaultMiterLimit;
|
||||
textStrokeStyleMiterLimit : ol.render.canvas.defaultMiterLimit;
|
||||
var strokeStyle = ol.colorlike.asColorLike(textStrokeStyleColor ?
|
||||
textStrokeStyleColor : ol.render.canvas.defaultStrokeStyle);
|
||||
textStrokeStyleColor : ol.render.canvas.defaultStrokeStyle);
|
||||
if (!this.textStrokeState_) {
|
||||
this.textStrokeState_ = {
|
||||
lineCap: lineCap,
|
||||
@@ -305,11 +305,11 @@ ol.render.canvas.TextReplay.prototype.setTextStyle = function(textStyle) {
|
||||
var textTextAlign = textStyle.getTextAlign();
|
||||
var textTextBaseline = textStyle.getTextBaseline();
|
||||
var font = textFont !== undefined ?
|
||||
textFont : ol.render.canvas.defaultFont;
|
||||
textFont : ol.render.canvas.defaultFont;
|
||||
var textAlign = textTextAlign !== undefined ?
|
||||
textTextAlign : ol.render.canvas.defaultTextAlign;
|
||||
textTextAlign : ol.render.canvas.defaultTextAlign;
|
||||
var textBaseline = textTextBaseline !== undefined ?
|
||||
textTextBaseline : ol.render.canvas.defaultTextBaseline;
|
||||
textTextBaseline : ol.render.canvas.defaultTextBaseline;
|
||||
if (!this.textState_) {
|
||||
this.textState_ = {
|
||||
font: font,
|
||||
|
||||
@@ -84,9 +84,9 @@ ol.render.Feature.prototype.getEnds = function() {
|
||||
ol.render.Feature.prototype.getExtent = function() {
|
||||
if (!this.extent_) {
|
||||
this.extent_ = this.type_ === ol.geom.GeometryType.POINT ?
|
||||
ol.extent.createOrUpdateFromCoordinate(this.flatCoordinates_) :
|
||||
ol.extent.createOrUpdateFromFlatCoordinates(
|
||||
this.flatCoordinates_, 0, this.flatCoordinates_.length, 2);
|
||||
ol.extent.createOrUpdateFromCoordinate(this.flatCoordinates_) :
|
||||
ol.extent.createOrUpdateFromFlatCoordinates(
|
||||
this.flatCoordinates_, 0, this.flatCoordinates_.length, 2);
|
||||
|
||||
}
|
||||
return this.extent_;
|
||||
|
||||
@@ -70,7 +70,7 @@ if (ol.ENABLE_WEBGL) {
|
||||
ol.render.webgl.triangleIsCounterClockwise = function(x1, y1, x2, y2, x3, y3) {
|
||||
var area = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);
|
||||
return (area <= ol.render.webgl.EPSILON && area >= -ol.render.webgl.EPSILON) ?
|
||||
undefined : area > 0;
|
||||
undefined : area > 0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -381,10 +381,10 @@ if (ol.ENABLE_WEBGL) {
|
||||
if (strokeStyle) {
|
||||
var strokeStyleLineDash = strokeStyle.getLineDash();
|
||||
this.state_.lineDash = strokeStyleLineDash ?
|
||||
strokeStyleLineDash : ol.render.webgl.defaultLineDash;
|
||||
strokeStyleLineDash : ol.render.webgl.defaultLineDash;
|
||||
var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();
|
||||
this.state_.lineDashOffset = strokeStyleLineDashOffset ?
|
||||
strokeStyleLineDashOffset : ol.render.webgl.defaultLineDashOffset;
|
||||
strokeStyleLineDashOffset : ol.render.webgl.defaultLineDashOffset;
|
||||
strokeStyleColor = strokeStyle.getColor();
|
||||
if (!(strokeStyleColor instanceof CanvasGradient) &&
|
||||
!(strokeStyleColor instanceof CanvasPattern)) {
|
||||
@@ -396,7 +396,7 @@ if (ol.ENABLE_WEBGL) {
|
||||
}
|
||||
strokeStyleWidth = strokeStyle.getWidth();
|
||||
strokeStyleWidth = strokeStyleWidth !== undefined ?
|
||||
strokeStyleWidth : ol.render.webgl.defaultLineWidth;
|
||||
strokeStyleWidth : ol.render.webgl.defaultLineWidth;
|
||||
} else {
|
||||
strokeStyleColor = [0, 0, 0, 0];
|
||||
strokeStyleWidth = 0;
|
||||
|
||||
@@ -38,8 +38,8 @@ if (ol.ENABLE_WEBGL) {
|
||||
* @type {string}
|
||||
*/
|
||||
ol.render.webgl.circlereplay.defaultshader.Fragment.SOURCE = ol.DEBUG_WEBGL ?
|
||||
ol.render.webgl.circlereplay.defaultshader.Fragment.DEBUG_SOURCE :
|
||||
ol.render.webgl.circlereplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
|
||||
ol.render.webgl.circlereplay.defaultshader.Fragment.DEBUG_SOURCE :
|
||||
ol.render.webgl.circlereplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
|
||||
|
||||
|
||||
ol.render.webgl.circlereplay.defaultshader.fragment = new ol.render.webgl.circlereplay.defaultshader.Fragment();
|
||||
@@ -75,8 +75,8 @@ if (ol.ENABLE_WEBGL) {
|
||||
* @type {string}
|
||||
*/
|
||||
ol.render.webgl.circlereplay.defaultshader.Vertex.SOURCE = ol.DEBUG_WEBGL ?
|
||||
ol.render.webgl.circlereplay.defaultshader.Vertex.DEBUG_SOURCE :
|
||||
ol.render.webgl.circlereplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
|
||||
ol.render.webgl.circlereplay.defaultshader.Vertex.DEBUG_SOURCE :
|
||||
ol.render.webgl.circlereplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
|
||||
|
||||
|
||||
ol.render.webgl.circlereplay.defaultshader.vertex = new ol.render.webgl.circlereplay.defaultshader.Vertex();
|
||||
|
||||
@@ -497,12 +497,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,8 +38,8 @@ if (ol.ENABLE_WEBGL) {
|
||||
* @type {string}
|
||||
*/
|
||||
ol.render.webgl.imagereplay.defaultshader.Fragment.SOURCE = ol.DEBUG_WEBGL ?
|
||||
ol.render.webgl.imagereplay.defaultshader.Fragment.DEBUG_SOURCE :
|
||||
ol.render.webgl.imagereplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
|
||||
ol.render.webgl.imagereplay.defaultshader.Fragment.DEBUG_SOURCE :
|
||||
ol.render.webgl.imagereplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
|
||||
|
||||
|
||||
ol.render.webgl.imagereplay.defaultshader.fragment = new ol.render.webgl.imagereplay.defaultshader.Fragment();
|
||||
@@ -75,8 +75,8 @@ if (ol.ENABLE_WEBGL) {
|
||||
* @type {string}
|
||||
*/
|
||||
ol.render.webgl.imagereplay.defaultshader.Vertex.SOURCE = ol.DEBUG_WEBGL ?
|
||||
ol.render.webgl.imagereplay.defaultshader.Vertex.DEBUG_SOURCE :
|
||||
ol.render.webgl.imagereplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
|
||||
ol.render.webgl.imagereplay.defaultshader.Vertex.DEBUG_SOURCE :
|
||||
ol.render.webgl.imagereplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
|
||||
|
||||
|
||||
ol.render.webgl.imagereplay.defaultshader.vertex = new ol.render.webgl.imagereplay.defaultshader.Vertex();
|
||||
|
||||
@@ -171,7 +171,7 @@ if (ol.ENABLE_WEBGL) {
|
||||
var context = this.context_;
|
||||
var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
|
||||
var replay = /** @type {ol.render.webgl.ImageReplay} */ (
|
||||
replayGroup.getReplay(0, ol.render.ReplayType.IMAGE));
|
||||
replayGroup.getReplay(0, ol.render.ReplayType.IMAGE));
|
||||
replay.setImageStyle(this.imageStyle_);
|
||||
replay.drawPoint(geometry, data);
|
||||
replay.finish(context);
|
||||
@@ -194,7 +194,7 @@ if (ol.ENABLE_WEBGL) {
|
||||
var context = this.context_;
|
||||
var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
|
||||
var replay = /** @type {ol.render.webgl.ImageReplay} */ (
|
||||
replayGroup.getReplay(0, ol.render.ReplayType.IMAGE));
|
||||
replayGroup.getReplay(0, ol.render.ReplayType.IMAGE));
|
||||
replay.setImageStyle(this.imageStyle_);
|
||||
replay.drawMultiPoint(geometry, data);
|
||||
replay.finish(context);
|
||||
@@ -216,7 +216,7 @@ if (ol.ENABLE_WEBGL) {
|
||||
var context = this.context_;
|
||||
var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
|
||||
var replay = /** @type {ol.render.webgl.LineStringReplay} */ (
|
||||
replayGroup.getReplay(0, ol.render.ReplayType.LINE_STRING));
|
||||
replayGroup.getReplay(0, ol.render.ReplayType.LINE_STRING));
|
||||
replay.setFillStrokeStyle(null, this.strokeStyle_);
|
||||
replay.drawLineString(geometry, data);
|
||||
replay.finish(context);
|
||||
@@ -238,7 +238,7 @@ if (ol.ENABLE_WEBGL) {
|
||||
var context = this.context_;
|
||||
var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
|
||||
var replay = /** @type {ol.render.webgl.LineStringReplay} */ (
|
||||
replayGroup.getReplay(0, ol.render.ReplayType.LINE_STRING));
|
||||
replayGroup.getReplay(0, ol.render.ReplayType.LINE_STRING));
|
||||
replay.setFillStrokeStyle(null, this.strokeStyle_);
|
||||
replay.drawMultiLineString(geometry, data);
|
||||
replay.finish(context);
|
||||
@@ -260,7 +260,7 @@ if (ol.ENABLE_WEBGL) {
|
||||
var context = this.context_;
|
||||
var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
|
||||
var replay = /** @type {ol.render.webgl.PolygonReplay} */ (
|
||||
replayGroup.getReplay(0, ol.render.ReplayType.POLYGON));
|
||||
replayGroup.getReplay(0, ol.render.ReplayType.POLYGON));
|
||||
replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);
|
||||
replay.drawPolygon(geometry, data);
|
||||
replay.finish(context);
|
||||
@@ -282,7 +282,7 @@ if (ol.ENABLE_WEBGL) {
|
||||
var context = this.context_;
|
||||
var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
|
||||
var replay = /** @type {ol.render.webgl.PolygonReplay} */ (
|
||||
replayGroup.getReplay(0, ol.render.ReplayType.POLYGON));
|
||||
replayGroup.getReplay(0, ol.render.ReplayType.POLYGON));
|
||||
replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);
|
||||
replay.drawMultiPolygon(geometry, data);
|
||||
replay.finish(context);
|
||||
@@ -304,7 +304,7 @@ if (ol.ENABLE_WEBGL) {
|
||||
var context = this.context_;
|
||||
var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
|
||||
var replay = /** @type {ol.render.webgl.CircleReplay} */ (
|
||||
replayGroup.getReplay(0, ol.render.ReplayType.CIRCLE));
|
||||
replayGroup.getReplay(0, ol.render.ReplayType.CIRCLE));
|
||||
replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);
|
||||
replay.drawCircle(geometry, data);
|
||||
replay.finish(context);
|
||||
|
||||
@@ -88,9 +88,9 @@ if (ol.ENABLE_WEBGL) {
|
||||
//ol.render.webgl.LineStringReplay.Instruction_, and a rounding factor (1 or 2). If the product is even,
|
||||
//we round it. If it is odd, we don't.
|
||||
var lineJoin = this.state_.lineJoin === 'bevel' ? 0 :
|
||||
this.state_.lineJoin === 'miter' ? 1 : 2;
|
||||
this.state_.lineJoin === 'miter' ? 1 : 2;
|
||||
var lineCap = this.state_.lineCap === 'butt' ? 0 :
|
||||
this.state_.lineCap === 'square' ? 1 : 2;
|
||||
this.state_.lineCap === 'square' ? 1 : 2;
|
||||
var closed = ol.geom.flat.topology.lineStringIsClosed(flatCoordinates, offset, end, stride);
|
||||
var startCoords, sign, n;
|
||||
var lastIndex = numIndices;
|
||||
@@ -194,7 +194,7 @@ if (ol.ENABLE_WEBGL) {
|
||||
|
||||
// We group CW and straight lines, thus the not so inituitive CCW checking function.
|
||||
sign = ol.render.webgl.triangleIsCounterClockwise(p0[0], p0[1], p1[0], p1[1], p2[0], p2[1])
|
||||
? -1 : 1;
|
||||
? -1 : 1;
|
||||
|
||||
numVertices = this.addVertices_(p0, p1, p2,
|
||||
sign * ol.render.webgl.LineStringReplay.Instruction_.BEVEL_FIRST * (lineJoin || 1), numVertices);
|
||||
@@ -236,7 +236,7 @@ if (ol.ENABLE_WEBGL) {
|
||||
if (closed) {
|
||||
n = n || numVertices / 7;
|
||||
sign = ol.geom.flat.orient.linearRingIsClockwise([p0[0], p0[1], p1[0], p1[1], p2[0], p2[1]], 0, 6, 2)
|
||||
? 1 : -1;
|
||||
? 1 : -1;
|
||||
|
||||
numVertices = this.addVertices_(p0, p1, p2,
|
||||
sign * ol.render.webgl.LineStringReplay.Instruction_.BEVEL_FIRST * (lineJoin || 1), numVertices);
|
||||
@@ -635,16 +635,16 @@ if (ol.ENABLE_WEBGL) {
|
||||
ol.render.webgl.LineStringReplay.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
|
||||
var strokeStyleLineCap = strokeStyle.getLineCap();
|
||||
this.state_.lineCap = strokeStyleLineCap !== undefined ?
|
||||
strokeStyleLineCap : ol.render.webgl.defaultLineCap;
|
||||
strokeStyleLineCap : ol.render.webgl.defaultLineCap;
|
||||
var strokeStyleLineDash = strokeStyle.getLineDash();
|
||||
this.state_.lineDash = strokeStyleLineDash ?
|
||||
strokeStyleLineDash : ol.render.webgl.defaultLineDash;
|
||||
strokeStyleLineDash : ol.render.webgl.defaultLineDash;
|
||||
var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();
|
||||
this.state_.lineDashOffset = strokeStyleLineDashOffset ?
|
||||
strokeStyleLineDashOffset : ol.render.webgl.defaultLineDashOffset;
|
||||
strokeStyleLineDashOffset : ol.render.webgl.defaultLineDashOffset;
|
||||
var strokeStyleLineJoin = strokeStyle.getLineJoin();
|
||||
this.state_.lineJoin = strokeStyleLineJoin !== undefined ?
|
||||
strokeStyleLineJoin : ol.render.webgl.defaultLineJoin;
|
||||
strokeStyleLineJoin : ol.render.webgl.defaultLineJoin;
|
||||
var strokeStyleColor = strokeStyle.getColor();
|
||||
if (!(strokeStyleColor instanceof CanvasGradient) &&
|
||||
!(strokeStyleColor instanceof CanvasPattern)) {
|
||||
@@ -656,10 +656,10 @@ if (ol.ENABLE_WEBGL) {
|
||||
}
|
||||
var strokeStyleWidth = strokeStyle.getWidth();
|
||||
strokeStyleWidth = strokeStyleWidth !== undefined ?
|
||||
strokeStyleWidth : ol.render.webgl.defaultLineWidth;
|
||||
strokeStyleWidth : ol.render.webgl.defaultLineWidth;
|
||||
var strokeStyleMiterLimit = strokeStyle.getMiterLimit();
|
||||
strokeStyleMiterLimit = strokeStyleMiterLimit !== undefined ?
|
||||
strokeStyleMiterLimit : ol.render.webgl.defaultMiterLimit;
|
||||
strokeStyleMiterLimit : ol.render.webgl.defaultMiterLimit;
|
||||
if (!this.state_.strokeColor || !ol.array.equals(this.state_.strokeColor, strokeStyleColor) ||
|
||||
this.state_.lineWidth !== strokeStyleWidth || this.state_.miterLimit !== strokeStyleMiterLimit) {
|
||||
this.state_.changed = true;
|
||||
|
||||
@@ -38,8 +38,8 @@ if (ol.ENABLE_WEBGL) {
|
||||
* @type {string}
|
||||
*/
|
||||
ol.render.webgl.linestringreplay.defaultshader.Fragment.SOURCE = ol.DEBUG_WEBGL ?
|
||||
ol.render.webgl.linestringreplay.defaultshader.Fragment.DEBUG_SOURCE :
|
||||
ol.render.webgl.linestringreplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
|
||||
ol.render.webgl.linestringreplay.defaultshader.Fragment.DEBUG_SOURCE :
|
||||
ol.render.webgl.linestringreplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
|
||||
|
||||
|
||||
ol.render.webgl.linestringreplay.defaultshader.fragment = new ol.render.webgl.linestringreplay.defaultshader.Fragment();
|
||||
@@ -75,8 +75,8 @@ if (ol.ENABLE_WEBGL) {
|
||||
* @type {string}
|
||||
*/
|
||||
ol.render.webgl.linestringreplay.defaultshader.Vertex.SOURCE = ol.DEBUG_WEBGL ?
|
||||
ol.render.webgl.linestringreplay.defaultshader.Vertex.DEBUG_SOURCE :
|
||||
ol.render.webgl.linestringreplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
|
||||
ol.render.webgl.linestringreplay.defaultshader.Vertex.DEBUG_SOURCE :
|
||||
ol.render.webgl.linestringreplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
|
||||
|
||||
|
||||
ol.render.webgl.linestringreplay.defaultshader.vertex = new ol.render.webgl.linestringreplay.defaultshader.Vertex();
|
||||
|
||||
@@ -211,8 +211,8 @@ if (ol.ENABLE_WEBGL) {
|
||||
do {
|
||||
var reflex = ccw ? ol.render.webgl.triangleIsCounterClockwise(s1.p1.x,
|
||||
s1.p1.y, s0.p1.x, s0.p1.y, s0.p0.x, s0.p0.y) :
|
||||
ol.render.webgl.triangleIsCounterClockwise(s0.p0.x, s0.p0.y, s0.p1.x,
|
||||
s0.p1.y, s1.p1.x, s1.p1.y);
|
||||
ol.render.webgl.triangleIsCounterClockwise(s0.p0.x, s0.p0.y, s0.p1.x,
|
||||
s0.p1.y, s1.p1.x, s1.p1.y);
|
||||
if (reflex === undefined) {
|
||||
this.removeItem_(s0, s1, list, rtree);
|
||||
pointsReclassified = true;
|
||||
@@ -609,7 +609,7 @@ if (ol.ENABLE_WEBGL) {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* @private
|
||||
* @param {ol.WebglPolygonSegment} s0 Segment before the remove candidate.
|
||||
* @param {ol.WebglPolygonSegment} s1 Remove candidate segment.
|
||||
@@ -642,7 +642,7 @@ if (ol.ENABLE_WEBGL) {
|
||||
var result = [];
|
||||
var segmentsInExtent = rtree.getInExtent([Math.min(p0.x, p1.x, p2.x),
|
||||
Math.min(p0.y, p1.y, p2.y), Math.max(p0.x, p1.x, p2.x), Math.max(p0.y,
|
||||
p1.y, p2.y)]);
|
||||
p1.y, p2.y)]);
|
||||
for (i = 0, ii = segmentsInExtent.length; i < ii; ++i) {
|
||||
for (j in segmentsInExtent[i]) {
|
||||
p = segmentsInExtent[i][j];
|
||||
|
||||
@@ -38,8 +38,8 @@ if (ol.ENABLE_WEBGL) {
|
||||
* @type {string}
|
||||
*/
|
||||
ol.render.webgl.polygonreplay.defaultshader.Fragment.SOURCE = ol.DEBUG_WEBGL ?
|
||||
ol.render.webgl.polygonreplay.defaultshader.Fragment.DEBUG_SOURCE :
|
||||
ol.render.webgl.polygonreplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
|
||||
ol.render.webgl.polygonreplay.defaultshader.Fragment.DEBUG_SOURCE :
|
||||
ol.render.webgl.polygonreplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
|
||||
|
||||
|
||||
ol.render.webgl.polygonreplay.defaultshader.fragment = new ol.render.webgl.polygonreplay.defaultshader.Fragment();
|
||||
@@ -75,8 +75,8 @@ if (ol.ENABLE_WEBGL) {
|
||||
* @type {string}
|
||||
*/
|
||||
ol.render.webgl.polygonreplay.defaultshader.Vertex.SOURCE = ol.DEBUG_WEBGL ?
|
||||
ol.render.webgl.polygonreplay.defaultshader.Vertex.DEBUG_SOURCE :
|
||||
ol.render.webgl.polygonreplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
|
||||
ol.render.webgl.polygonreplay.defaultshader.Vertex.DEBUG_SOURCE :
|
||||
ol.render.webgl.polygonreplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
|
||||
|
||||
|
||||
ol.render.webgl.polygonreplay.defaultshader.vertex = new ol.render.webgl.polygonreplay.defaultshader.Vertex();
|
||||
|
||||
@@ -309,11 +309,11 @@ if (ol.ENABLE_WEBGL) {
|
||||
}
|
||||
|
||||
gl.uniformMatrix4fv(locations.u_projectionMatrix, false,
|
||||
ol.vec.Mat4.fromTransform(this.tmpMat4_, projectionMatrix));
|
||||
ol.vec.Mat4.fromTransform(this.tmpMat4_, projectionMatrix));
|
||||
gl.uniformMatrix4fv(locations.u_offsetScaleMatrix, false,
|
||||
ol.vec.Mat4.fromTransform(this.tmpMat4_, offsetScaleMatrix));
|
||||
ol.vec.Mat4.fromTransform(this.tmpMat4_, offsetScaleMatrix));
|
||||
gl.uniformMatrix4fv(locations.u_offsetRotateMatrix, false,
|
||||
ol.vec.Mat4.fromTransform(this.tmpMat4_, offsetRotateMatrix));
|
||||
ol.vec.Mat4.fromTransform(this.tmpMat4_, offsetRotateMatrix));
|
||||
gl.uniform1f(locations.u_opacity, opacity);
|
||||
|
||||
// draw!
|
||||
@@ -335,10 +335,10 @@ if (ol.ENABLE_WEBGL) {
|
||||
}
|
||||
gl.clear(gl.STENCIL_BUFFER_BIT);
|
||||
gl.stencilFunc(/** @type {number} */ (tmpStencilFunc),
|
||||
/** @type {number} */ (tmpStencilRef), /** @type {number} */ (tmpStencilMaskVal));
|
||||
/** @type {number} */ (tmpStencilRef), /** @type {number} */ (tmpStencilMaskVal));
|
||||
gl.stencilMask(/** @type {number} */ (tmpStencilMask));
|
||||
gl.stencilOp(/** @type {number} */ (tmpStencilOpFail),
|
||||
/** @type {number} */ (tmpStencilOpZFail), /** @type {number} */ (tmpStencilOpPass));
|
||||
/** @type {number} */ (tmpStencilOpZFail), /** @type {number} */ (tmpStencilOpPass));
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -354,7 +354,7 @@ if (ol.ENABLE_WEBGL) {
|
||||
ol.render.webgl.Replay.prototype.drawElements = function(
|
||||
gl, context, start, end) {
|
||||
var elementType = context.hasOESElementIndexUint ?
|
||||
ol.webgl.UNSIGNED_INT : ol.webgl.UNSIGNED_SHORT;
|
||||
ol.webgl.UNSIGNED_INT : ol.webgl.UNSIGNED_SHORT;
|
||||
var elementSize = context.hasOESElementIndexUint ? 4 : 2;
|
||||
|
||||
var numItems = end - start;
|
||||
|
||||
Reference in New Issue
Block a user