Fix skipping of texts with background
This commit is contained in:
@@ -258,14 +258,18 @@ CanvasTextReplay.prototype.drawText = function(geometry, feature) {
|
|||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
end = this.appendFlatCoordinates(flatCoordinates, 0, end, stride, false, false);
|
end = this.appendFlatCoordinates(flatCoordinates, 0, end, stride, false, false);
|
||||||
this.beginGeometry(geometry, feature);
|
|
||||||
if (textState.backgroundFill || textState.backgroundStroke) {
|
if (textState.backgroundFill || textState.backgroundStroke) {
|
||||||
this.setFillStrokeStyle(textState.backgroundFill, textState.backgroundStroke);
|
this.setFillStrokeStyle(textState.backgroundFill, textState.backgroundStroke);
|
||||||
this.updateFillStyle(this.state, this.createFill, geometry);
|
if (textState.backgroundFill) {
|
||||||
this.hitDetectionInstructions.push(this.createFill(this.state, geometry));
|
this.updateFillStyle(this.state, this.createFill, geometry);
|
||||||
this.updateStrokeStyle(this.state, this.applyStroke);
|
this.hitDetectionInstructions.push(this.createFill(this.state, geometry));
|
||||||
this.hitDetectionInstructions.push(this.createStroke(this.state));
|
}
|
||||||
|
if (textState.backgroundStroke) {
|
||||||
|
this.updateStrokeStyle(this.state, this.applyStroke);
|
||||||
|
this.hitDetectionInstructions.push(this.createStroke(this.state));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
this.beginGeometry(geometry, feature);
|
||||||
this.drawTextImage_(label, begin, end);
|
this.drawTextImage_(label, begin, end);
|
||||||
this.endGeometry(geometry, feature);
|
this.endGeometry(geometry, feature);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user