MCPcopy Create free account
hub / github.com/alefore/knit / handleClick

Method handleClick

src/canvas_input_handler.ts:102–111  ·  view source on GitHub ↗
(event: MouseEvent)

Source from the content-addressed store, hash-verified

100 }
101
102 private handleClick(event: MouseEvent): void {
103 const {currentPattern} = this.delegate.getCurrentCanvasState();
104 if (currentPattern === null || !this.isClick) {
105 return;
106 }
107
108 const patternCoords = this.getTransformedCoordinates(
109 this.getClickCoordinates({x: event.clientX, y: event.clientY}));
110 this.delegate.onClick(patternCoords);
111 }
112}

Callers

nothing calls this directly

Calls 4

getClickCoordinatesMethod · 0.95
onClickMethod · 0.80
getCurrentCanvasStateMethod · 0.65

Tested by

no test coverage detected