blockly > utils > browserEvents > mouseToSvg
Funzione utils.browserEvents.mouseToSvg()
Restituisce le coordinate convertite dell'evento mouse specificato. L'origine (0,0) è l'angolo in alto a sinistra del file SVG di Blockly.
Firma:
export declare function mouseToSvg(e: MouseEvent, svg: SVGSVGElement, matrix: SVGMatrix | null): SVGPoint;
Parametri
Parametro | Tipo | Descrizione |
---|---|---|
e | MouseEvent | Evento mouse. |
svg | SVGSVGElement | Elemento SVG. |
matrix | SVGMatrix | null | CTM schermo invertito da utilizzare. |
Resi:
SVGPoint
Oggetto con proprietà .x e .y.