insetHoldsWhole関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Whether a box holds its region whole, rather than only some of its pieces (outlyingBelow, within).
インポート
import { insetHoldsWhole } from "@johnmorrisdotca/chizu";
定義
function insetHoldsWhole(inset: ChizuInset): boolean
引数
| 名前 | 型 | 説明 |
|---|---|---|
inset | ChizuInset | The native inset placement and optional restriction to part of a region. |
戻り値
boolean
Whether a box holds its region whole, rather than only some of its pieces (outlyingBelow, within).
例
import { insetHoldsWhole } from "@johnmorrisdotca/chizu";
const box = { x: 0, y: 0, width: 10, height: 10 };
console.log(insetHoldsWhole({ code: "AK", box }), insetHoldsWhole({ code: "46", box, outlyingBelow: 900 }));
// true falsetrue false出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。