FramingCrop型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The crop of a flag at one shape: which crop fit: "auto" chooses, and the side fit: "crop" asked for by name keeps.
Both the whole flag and a crop are offered for every flag: fit: "whole" shows all of it, fit: "crop" crops it.
インポート
import type { FramingCrop } from "@johnmorrisdotca/hata/manifest";
定義
interface FramingCrop {
rule: "own" | "curated" | "centre" | "whole";
at: "left" | "right" | "top" | "bottom" | "centre";
why: string | null;
loses: string[];
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
rule | "whole" | "own" | "curated" | "centre" | What |
at | "centre" | "left" | "right" | "top" | "bottom" | The side |
why | string | null | Why a person chose this side, or chose to show the flag whole; null where nobody chose (a centre crop, or a flag that is already this shape). |
loses | string[] | The colours (each covering 5% or more of the flag) that a crop at |
例
import { manifest, type FramingCrop } from "@johnmorrisdotca/hata/manifest";
const crop: FramingCrop | undefined = manifest("US-HI")?.framings["1:1"].crop;
console.log(crop?.rule); // "curated": a person chose the side
console.log(crop?.at); // "left": the canton and the stripes beside itcurated
left出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。