研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
blockly >IDragTarget >IDragTargetgetClientRect
IDragTarget.getClientRect() 方法
用于返回拖动目标区域相对于视口的边界矩形(以像素单位表示)。
Signature:
getClientRect(): Rect | null;
返回:
矩形 |null
组件的边界框。如果应忽略拖动目标区域,则为 null。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-12。
[null,null,["最后更新时间 (UTC):2024-09-12。"],[[["`IDragTarget.getClientRect()` returns the drag target's bounding box in pixel units, relative to the viewport."],["The returned value is a `Rect` object containing the bounding box dimensions, or `null` if the drag target area should be ignored."]]],["The `getClientRect()` method, part of the `IDragTarget` interface, returns the drag target area's bounding rectangle. This rectangle's dimensions are in pixel units relative to the viewport. The method's output is either a `Rect` object representing the bounding box or `null`. A `null` return value indicates that the drag target area should be disregarded during drag operations.\n"]]