研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
blockly > IFlyout > isDragTowardWorkspace
IFlyout.isDragTowardWorkspace() 方法
根据动作条的屏幕位置和方向,确定拖动增量是否朝向工作区。此方法在 determineDragIntention_ 中用于确定是否应创建新分块或是否应滚动动作条。
Signature:
isDragTowardWorkspace(currentDragDeltaXY: Coordinate): boolean;
参数
参数 |
类型 |
说明 |
currentDragDeltaXY |
坐标 |
指针从按下鼠标时的位置移动了多远(以像素为单位)。 |
返回:
布尔值
如果拖动是朝向工作区,则为 true。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-11-22。
[null,null,["最后更新时间 (UTC):2024-11-22。"],[[["The `isDragTowardWorkspace` method in Blockly's `IFlyout` interface determines if a drag is directed towards the workspace."],["It uses the drag delta (change in mouse position) and flyout's orientation to decide if a new block should be created or the flyout should scroll."],["The method returns `true` if the drag is toward the workspace, otherwise `false`."]]],[]]