blockly > utils > browserEvents > mouseToSvg

utils.browserEvents.mouseToSvg() 함수

지정된 마우스 이벤트의 변환된 좌표를 반환합니다. 원점 (0,0)은 Blockly SVG의 왼쪽 상단입니다.

Signature:

export declare function mouseToSvg(e: MouseEvent, svg: SVGSVGElement, matrix: SVGMatrix | null): SVGPoint;

매개변수

매개변수 유형 설명
e MouseEvent 마우스 이벤트
svg SVGSVGElement SVG 요소.
행렬 SVGMatrix | null 사용할 반전 화면 CTM

반환:

SVGPoint

.x 및 .y 속성이 있는 객체입니다.