סקר מחקר: נשמח לשמוע על החוויה שלך עם Blockly
לפתיחת הסקר
blockly > סרגל גלילה > setOrigin
מתעדים את המקור של סביבת העבודה שבה נמצא סרגל הגלילה, בפיקסלים ביחס למקור של החדרת div. האפשרות הזו מיועדת למקרים שבהם נעשה שימוש בסרגל הגלילה באובייקט שהמקור שלו לא זהה למרחב העבודה הראשי (למשל, בחלונית נפתחת).
Signature:
setOrigin(x: number, y: number): void;
פרמטרים
פרמטר |
סוג |
תיאור |
x |
number |
קואורדינטת ה-x של מקור סרגל הגלילה, בפיקסלים של CSS. |
y |
number |
קואורדינטת ה-y של מקור סרגל הגלילה, בפיקסלים של CSS. |
החזרות:
ריק
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-09-11 (שעון UTC).
[null,null,["עדכון אחרון: 2024-09-11 (שעון UTC)."],[[["The `Scrollbar.setOrigin()` method is used to set the origin of a scrollbar relative to its containing workspace, particularly useful when the scrollbar is within elements like flyouts that have different origins."],["It takes two parameters, `x` and `y`, representing the horizontal and vertical coordinates of the scrollbar's origin in CSS pixels, respectively."],["This method records the workspace origin for the scrollbar, ensuring proper positioning and functionality even when used in elements outside the main workspace area."]]],[]]