CalloutKeepOut型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The lengths of frame kept clear at the bottom-right corner, in the map's units: up the right edge before the corner and along the bottom edge after it, which is where the credit line is drawn.
インポート
import type { CalloutKeepOut } from "@johnmorrisdotca/chizu";
定義
type CalloutKeepOut = {
bottom: number;
right: number;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
bottom | number | |
right | number |
例
import { calloutSpaces, type CalloutKeepOut } from "@johnmorrisdotca/chizu";
const keepOut: CalloutKeepOut = { bottom: 20, right: 20 };
const spaces = calloutSpaces(4, { x: 0, y: 0, width: 100, height: 100 }, keepOut, []);
console.log(spaces.every((place) => place.x < 80 || place.y < 80));
// truetrue出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。