blockly > IDragTarget > shouldPreventMove
IDragTarget.shouldpreventMove() 方法
用于返回在放置此组件后是否应移动提供的图块或气泡。如果为 true,元素将返回到拖动开始时的位置。
Signature:
shouldPreventMove(dragElement: IDraggable): boolean;
参数
参数 | 类型 | 说明 |
---|---|---|
dragElement | IDraggable | 当前正在拖动的方块或气泡。 |
返回:
boolean
是否应返回所提供的方块或气泡才能开始拖动。