mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-03 13:18:58 +00:00
@@ -59,11 +59,16 @@ const DEFAULTS: Record<OpeningPlacementType, number> = {
|
||||
gate: 300,
|
||||
};
|
||||
|
||||
/** One authority for toolbar presets and dialog type changes. */
|
||||
export function openingDefaultLengthCm(type: OpeningPlacementType): number {
|
||||
return DEFAULTS[type];
|
||||
}
|
||||
|
||||
export function openingPlacementPreset(
|
||||
type: OpeningPlacementType,
|
||||
revision: number,
|
||||
): OpeningPlacementPreset {
|
||||
return { type, lengthCm: DEFAULTS[type], flipH: false, flipV: false, revision };
|
||||
return { type, lengthCm: openingDefaultLengthCm(type), flipH: false, flipV: false, revision };
|
||||
}
|
||||
|
||||
function pointOrder(a: readonly number[], b: readonly number[]): number {
|
||||
|
||||
Reference in New Issue
Block a user