研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
blockly >BlockSvg >bumpNeighbours
BlockSvg.bumpNeighbours() 方法
凸起未连接的块不对齐。
实际上并未连接的两个区块不应巧妙地在屏幕上对齐,否则会让最终用户感到困惑。
Signature:
bumpNeighbours(): void;
返回:
void
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-12。
[null,null,["最后更新时间 (UTC):2024-09-12。"],[[["The `bumpNeighbours()` method prevents unconnected blocks from visually aligning, avoiding user confusion."],["This is achieved by slightly shifting the positions of unconnected blocks that happen to overlap or line up."],["The function does not return any value and is used to improve the visual clarity of the block arrangement."]]],["The `bumpNeighbours` method in BlockSvg repositions unconnected blocks to prevent them from aligning coincidentally on the screen. This action is performed to avoid user confusion caused by the misleading appearance of a connection. The method has no parameters and returns nothing (`void`). Its core function is to adjust the positioning of blocks that are not linked to ensure clear visual separation.\n"]]