Better code indentation
This commit is contained in:
@@ -119,8 +119,7 @@ inherits(CanvasImageReplay, CanvasReplay);
|
||||
* @return {number} My end.
|
||||
*/
|
||||
CanvasImageReplay.prototype.drawCoordinates_ = function(flatCoordinates, offset, end, stride) {
|
||||
return this.appendFlatCoordinates(
|
||||
flatCoordinates, offset, end, stride, false, false);
|
||||
return this.appendFlatCoordinates(flatCoordinates, offset, end, stride, false, false);
|
||||
};
|
||||
|
||||
|
||||
@@ -135,8 +134,7 @@ CanvasImageReplay.prototype.drawPoint = function(pointGeometry, feature) {
|
||||
const flatCoordinates = pointGeometry.getFlatCoordinates();
|
||||
const stride = pointGeometry.getStride();
|
||||
const myBegin = this.coordinates.length;
|
||||
const myEnd = this.drawCoordinates_(
|
||||
flatCoordinates, 0, flatCoordinates.length, stride);
|
||||
const myEnd = this.drawCoordinates_(flatCoordinates, 0, flatCoordinates.length, stride);
|
||||
this.instructions.push([
|
||||
CanvasInstruction.DRAW_IMAGE, myBegin, myEnd, this.image_,
|
||||
// Remaining arguments to DRAW_IMAGE are in alphabetical order
|
||||
@@ -145,8 +143,7 @@ CanvasImageReplay.prototype.drawPoint = function(pointGeometry, feature) {
|
||||
this.scale_ * this.pixelRatio, this.snapToPixel_, this.width_
|
||||
]);
|
||||
this.hitDetectionInstructions.push([
|
||||
CanvasInstruction.DRAW_IMAGE, myBegin, myEnd,
|
||||
this.hitDetectionImage_,
|
||||
CanvasInstruction.DRAW_IMAGE, myBegin, myEnd, this.hitDetectionImage_,
|
||||
// Remaining arguments to DRAW_IMAGE are in alphabetical order
|
||||
this.anchorX_, this.anchorY_, this.declutterGroup_, this.height_, this.opacity_,
|
||||
this.originX_, this.originY_, this.rotateWithView_, this.rotation_,
|
||||
@@ -177,8 +174,7 @@ CanvasImageReplay.prototype.drawMultiPoint = function(multiPointGeometry, featur
|
||||
this.scale_ * this.pixelRatio, this.snapToPixel_, this.width_
|
||||
]);
|
||||
this.hitDetectionInstructions.push([
|
||||
CanvasInstruction.DRAW_IMAGE, myBegin, myEnd,
|
||||
this.hitDetectionImage_,
|
||||
CanvasInstruction.DRAW_IMAGE, myBegin, myEnd, this.hitDetectionImage_,
|
||||
// Remaining arguments to DRAW_IMAGE are in alphabetical order
|
||||
this.anchorX_, this.anchorY_, this.declutterGroup_, this.height_, this.opacity_,
|
||||
this.originX_, this.originY_, this.rotateWithView_, this.rotation_,
|
||||
|
||||
@@ -384,8 +384,7 @@ CanvasImmediateRenderer.prototype.moveToLineTo_ = function(flatCoordinates, offs
|
||||
*/
|
||||
CanvasImmediateRenderer.prototype.drawRings_ = function(flatCoordinates, offset, ends, stride) {
|
||||
for (let i = 0, ii = ends.length; i < ii; ++i) {
|
||||
offset = this.moveToLineTo_(
|
||||
flatCoordinates, offset, ends[i], stride, true);
|
||||
offset = this.moveToLineTo_(flatCoordinates, offset, ends[i], stride, true);
|
||||
}
|
||||
return offset;
|
||||
};
|
||||
@@ -610,8 +609,7 @@ CanvasImmediateRenderer.prototype.drawMultiLineString = function(geometry) {
|
||||
const stride = geometry.getStride();
|
||||
context.beginPath();
|
||||
for (let i = 0, ii = ends.length; i < ii; ++i) {
|
||||
offset = this.moveToLineTo_(
|
||||
flatCoordinates, offset, ends[i], stride, false);
|
||||
offset = this.moveToLineTo_(flatCoordinates, offset, ends[i], stride, false);
|
||||
}
|
||||
context.stroke();
|
||||
}
|
||||
|
||||
@@ -91,8 +91,7 @@ CanvasLineStringReplay.prototype.drawMultiLineString = function(multiLineStringG
|
||||
const stride = multiLineStringGeometry.getStride();
|
||||
let offset = 0;
|
||||
for (let i = 0, ii = ends.length; i < ii; ++i) {
|
||||
offset = this.drawFlatCoordinates_(
|
||||
flatCoordinates, offset, ends[i], stride);
|
||||
offset = this.drawFlatCoordinates_(flatCoordinates, offset, ends[i], stride);
|
||||
}
|
||||
this.hitDetectionInstructions.push(strokeInstruction);
|
||||
this.endGeometry(multiLineStringGeometry, feature);
|
||||
|
||||
@@ -49,8 +49,7 @@ CanvasPolygonReplay.prototype.drawFlatCoordinatess_ = function(flatCoordinates,
|
||||
for (let i = 0; i < numEnds; ++i) {
|
||||
const end = ends[i];
|
||||
const myBegin = this.coordinates.length;
|
||||
const myEnd = this.appendFlatCoordinates(
|
||||
flatCoordinates, offset, end, stride, true, !stroke);
|
||||
const myEnd = this.appendFlatCoordinates(flatCoordinates, offset, end, stride, true, !stroke);
|
||||
const moveToLineToInstruction = [CanvasInstruction.MOVE_TO_LINE_TO, myBegin, myEnd];
|
||||
this.instructions.push(moveToLineToInstruction);
|
||||
this.hitDetectionInstructions.push(moveToLineToInstruction);
|
||||
@@ -174,8 +173,7 @@ CanvasPolygonReplay.prototype.drawMultiPolygon = function(multiPolygonGeometry,
|
||||
const stride = multiPolygonGeometry.getStride();
|
||||
let offset = 0;
|
||||
for (let i = 0, ii = endss.length; i < ii; ++i) {
|
||||
offset = this.drawFlatCoordinatess_(
|
||||
flatCoordinates, offset, endss[i], stride);
|
||||
offset = this.drawFlatCoordinatess_(flatCoordinates, offset, endss[i], stride);
|
||||
}
|
||||
this.endGeometry(multiPolygonGeometry, feature);
|
||||
};
|
||||
|
||||
@@ -201,8 +201,7 @@ CanvasTextReplay.prototype.drawText = function(geometry, feature) {
|
||||
let flatEnd;
|
||||
for (let o = 0, oo = ends.length; o < oo; ++o) {
|
||||
if (textAlign == undefined) {
|
||||
const range = matchingChunk(
|
||||
textState.maxAngle, flatCoordinates, flatOffset, ends[o], stride);
|
||||
const range = matchingChunk(textState.maxAngle, flatCoordinates, flatOffset, ends[o], stride);
|
||||
flatOffset = range[0];
|
||||
flatEnd = range[1];
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user