blockly > browserEvents > mouseToSvg
Funkcja BrowserEvents.mouseToSvg()
Zwraca przekonwertowane współrzędne danego zdarzenia myszy. Punkt początkowy (0,0) to lewy górny róg pliku SVG Blockly
Podpis:
export declare function mouseToSvg(e: MouseEvent, svg: SVGSVGElement, matrix: SVGMatrix | null): SVGPoint;
Parametry
Parametr |
Typ |
Opis |
e |
MouseEvent |
Zdarzenie myszy. |
svg |
SVGSVGElement |
SVG. |
Matrix |
SVGMatrix | wartość null |
Odwrócony system CTM do użycia. |
Zwroty:
SVGPoint
Obiekt z właściwościami .x i .y.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-08-21 UTC.
[null,null,["Ostatnia aktualizacja: 2024-08-21 UTC."],[[["`browserEvents.mouseToSvg()` converts mouse event coordinates to SVG coordinates relative to the Blockly SVG's top-left corner."],["The function takes a MouseEvent, an SVGSVGElement, and an optional inverted screen CTM as input."],["It returns an SVGPoint object containing the converted x and y coordinates."]]],[]]