סקר מחקר: נשמח לשמוע על החוויה שלך עם Blockly
לפתיחת הסקר
blockly > browserEvents > mouseToSvg
הפונקציה browserEvents.mouseToSvg()
מחזירה את הקואורדינטות המומרים של אירוע העכבר הנתון. המקור (0,0) הוא הפינה השמאלית העליונה של קובץ ה-SVG של Blockly.
Signature:
export declare function mouseToSvg(e: MouseEvent, svg: SVGSVGElement, matrix: SVGMatrix | null): SVGPoint;
פרמטרים
פרמטר |
סוג |
תיאור |
e |
MouseEvent |
אירוע של סימון העכבר. |
svg |
SVGSVGElement |
SVG. |
המאטריקס |
SVGMatrix | null |
היפוך המסך כדי להשתמש ב-CTM. |
החזרות:
SVGPoint
אובייקט עם מאפיינים מסוג x ו-y.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-08-21 (שעון UTC).
[null,null,["עדכון אחרון: 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."]]],[]]