blockly > Options > setMetrics

Options.setMetrics 屬性

設定後,請將工作區的翻譯設定為與捲軸相符。這個函式會將工作區的翻譯設為與捲軸相符。引數會包含 x 和/或 y 屬性,也就是介於 0 和 1 之間的浮點值,用於指定捲動角度。

Signature:

setMetrics?: (p1: {
        x?: number;
        y?: number;
    }) => void;