Reference · Framing, geometry and quiz tools
insetHoldsWholefunction
Whether a box holds its region whole, rather than only some of its pieces (outlyingBelow, within).
Import it
import { insetHoldsWhole } from "@johnmorrisdotca/chizu";
Definition
function insetHoldsWhole(inset: ChizuInset): boolean
Parameters
| Name | Type | Description |
|---|---|---|
inset | ChizuInset | The native inset placement and optional restriction to part of a region. |
Returns
boolean
Whether a box holds its region whole, rather than only some of its pieces (outlyingBelow, within).
Examples
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 falseWhat it prints (run when this page was built)