stepMapZoom関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One step in or out, clamped: the ends stay put rather than wrapping.
インポート
import { stepMapZoom } from "@johnmorrisdotca/chizu";
定義
function stepMapZoom(zoom: MapZoom, by: 1 | -1): MapZoom
引数
| 名前 | 型 | 説明 |
|---|---|---|
zoom | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | A valid zoom step from MAP_ZOOM_LEVELS. |
by | 1 | -1 | The second segment endpoint’s vertical map coordinate. |
戻り値
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10
One step in or out, clamped: the ends stay put rather than wrapping.
例
import { stepMapZoom } from "@johnmorrisdotca/chizu";
console.log(stepMapZoom(1, 1), stepMapZoom(10, 1), stepMapZoom(1, -1));
// 2 10 12 10 1出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。