संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
ब्लॉकली > स्क्रोलबार > setOrigin
स्क्रोलबार के फ़ाइल फ़ोल्डर का ऑरिजिन, इंजेक्शन div के ऑरिजिन के हिसाब से पिक्सल में रिकॉर्ड करें. ऐसा तब होता है, जब स्क्रोलबार का इस्तेमाल किसी ऐसे ऑब्जेक्ट में किया जाता है जिसका ऑरिजिन, मुख्य फ़ाइल फ़ोल्डर से अलग होता है. जैसे, फ़्लायआउट में.
हस्ताक्षर:
setOrigin(x: number, y: number): void;
पैरामीटर
पैरामीटर |
टाइप |
ब्यौरा |
x |
संख्या |
सीएसएस पिक्सल में, स्क्रोलबार के ऑरिजिन का x कोऑर्डिनेट. |
y |
संख्या |
सीएसएस पिक्सल में, स्क्रोलबार के ऑरिजिन का y कोऑर्डिनेट. |
लौटाए जाने वाले प्रॉडक्ट:
अमान्य
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[],["The `setOrigin` method of the `Scrollbar` class records the workspace's origin relative to the injection div. It's used when the scrollbar is within an object whose origin differs from the main workspace. This method takes two parameters: `x` and `y`, representing the x and y coordinates of the scrollbar's origin in CSS pixels. It does not return any value. The purpose is to allow a scrollbar to work properly, even if the origin of the workspace differs.\n"]]