研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
blockly > Block > setMovable
Block.setMovable() 方法
设置此块是否可移动。
Signature:
setMovable(movable: boolean): void;
参数
参数 |
类型 |
说明 |
可移动 |
布尔值 |
如果可移动,则为 true。 |
返回:
void
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-11-30。
[null,null,["最后更新时间 (UTC):2024-11-30。"],[[["The `Block.setMovable()` method determines if a block can be moved or not within the Blockly workspace."],["It accepts a single boolean parameter, `movable`, which is set to `true` for movable blocks and `false` for immobile ones."],["Calling this method with the appropriate boolean value will update the block's movability status."]]],["The `Block.setMovable()` method determines if a block can be moved. It accepts a single boolean parameter, `movable`. When `movable` is set to `true`, the block becomes movable; otherwise, it remains stationary. This method does not return any value. It essentially sets the movable property of the block object based on the boolean provided.\n"]]