Hit lines even if they are dashed
This commit is contained in:
@@ -6,6 +6,7 @@ import CanvasInstruction, {
|
||||
beginPathInstruction,
|
||||
strokeInstruction,
|
||||
} from './Instruction.js';
|
||||
import {defaultLineDash, defaultLineDashOffset} from '../canvas.js';
|
||||
|
||||
class CanvasLineStringBuilder extends CanvasBuilder {
|
||||
/**
|
||||
@@ -67,8 +68,8 @@ class CanvasLineStringBuilder extends CanvasBuilder {
|
||||
state.lineCap,
|
||||
state.lineJoin,
|
||||
state.miterLimit,
|
||||
state.lineDash,
|
||||
state.lineDashOffset,
|
||||
defaultLineDash,
|
||||
defaultLineDashOffset,
|
||||
],
|
||||
beginPathInstruction
|
||||
);
|
||||
|
||||
@@ -74,6 +74,7 @@ export function createHitDetectionImageData(
|
||||
const stroke = style.getStroke();
|
||||
if (stroke) {
|
||||
stroke.setColor(color);
|
||||
stroke.setLineDash(null);
|
||||
}
|
||||
style.setText(undefined);
|
||||
const image = originalStyle.getImage();
|
||||
|
||||
Reference in New Issue
Block a user