Reference · Framing, geometry and quiz tools
CalloutKeepOuttype
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 it
import type { CalloutKeepOut } from "@johnmorrisdotca/chizu";
Definition
type CalloutKeepOut = {
bottom: number;
right: number;
};
Members
| Name | Type | Description |
|---|---|---|
bottom | number | |
right | number |
Examples
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));
// truetrueWhat it prints (run when this page was built)