封鎖 >封鎖 >moveBy

Block.moveBy() 方法

以相對偏移量移動區塊。

Signature:

moveBy(dx: number, dy: number, reason?: string[]): void;

參數

參數 類型 說明
dx 數字 水平偏移 (以工作區單位為單位)。
發行 數字 垂直偏移 (以工作區單位為單位)。
原因 string[] (選答) 為什麼會有這項異動?「drag」、「Bump」、「snap」...

傳回:

void