แบบสำรวจการวิจัย: บอกให้เราทราบเกี่ยวกับประสบการณ์การใช้งาน Blockly
เริ่มแบบสำรวจ
blockly > HorizontalFlyout setMetrics_
เมธอด HorizontalFlyout.setMetrics_()
ตั้งค่าการแปลของ Flyout ให้ตรงกับแถบเลื่อน
ลายเซ็น:
protected setMetrics_(xyRatio: {
x: number;
y: number;
}): void;
พารามิเตอร์
พารามิเตอร์ |
ประเภท |
คำอธิบาย |
xyRatio |
{ x: หมายเลข; y: ตัวเลข; } |
มีพร็อพเพอร์ตี้ y ซึ่งเป็นจำนวนลอยตัวระหว่าง 0 ถึง 1 ที่ระบุระดับของการเลื่อนและพร็อพเพอร์ตี้ x ที่คล้ายกัน |
การคืนสินค้า:
เป็นโมฆะ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-08-21 UTC
[null,null,["อัปเดตล่าสุด 2024-08-21 UTC"],[[["The `HorizontalFlyout.setMetrics_()` method adjusts the flyout's position to align with the scrollbars."],["It uses the `xyRatio` parameter, which includes `x` and `y` properties (between 0 and 1) indicating the horizontal and vertical scroll positions, to determine the translation."]]],["The `setMetrics_()` method in `HorizontalFlyout` adjusts the flyout's position based on scrollbar activity. It accepts an `xyRatio` parameter, which contains `x` and `y` properties, both floating-point numbers between 0 and 1. These values indicate the extent of scrolling in each direction. This method then translates the flyout to align with the current scroll positions, it doesn't return any value.\n"]]