Merge pull request #9986 from mike-000/patch-2
Make Circle geometry hit detection consistent with Polygon
This commit is contained in:
@@ -31,7 +31,7 @@ class CanvasPolygonBuilder extends CanvasBuilder {
|
||||
drawFlatCoordinatess_(flatCoordinates, offset, ends, stride) {
|
||||
const state = this.state;
|
||||
const fill = state.fillStyle !== undefined;
|
||||
const stroke = state.strokeStyle != undefined;
|
||||
const stroke = state.strokeStyle !== undefined;
|
||||
const numEnds = ends.length;
|
||||
this.instructions.push(beginPathInstruction);
|
||||
this.hitDetectionInstructions.push(beginPathInstruction);
|
||||
@@ -94,9 +94,9 @@ class CanvasPolygonBuilder extends CanvasBuilder {
|
||||
const circleInstruction = [CanvasInstruction.CIRCLE, myBegin];
|
||||
this.instructions.push(beginPathInstruction, circleInstruction);
|
||||
this.hitDetectionInstructions.push(beginPathInstruction, circleInstruction);
|
||||
this.hitDetectionInstructions.push(fillInstruction);
|
||||
if (state.fillStyle !== undefined) {
|
||||
this.instructions.push(fillInstruction);
|
||||
this.hitDetectionInstructions.push(fillInstruction);
|
||||
}
|
||||
if (state.strokeStyle !== undefined) {
|
||||
this.instructions.push(strokeInstruction);
|
||||
|
||||
Reference in New Issue
Block a user