Trim needless comments and fix the picker width

Remove comments that only restate the code, keeping the section banners
and the notes that carry a reason, a measured fact or an external
contract.

ButtonOptions.width claimed to be a fixed width but only set minWidth,
so the Graph and Texture pickers grew with the name they showed. It is
now what it promises, with a separate minWidth for the buttons that have
two forms. Narrow buttons shrink their padding, otherwise a 24px icon
button had 8px left for its glyph and truncate dropped it entirely.

__gm.labelsDropped() guards that class: the overflow guard only saw text
that was too wide, never a label truncated to nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Opus 5 committed 2026-09-08 15:52:05 +02:00
1 parent f16801aef3
commit 4d84231b9f
115 files changed
+707 -1564

No files matched your search

+2 -8
View File
@@ -1,32 +1,26 @@
/** Colors are stored as 0xRRGGBB numbers. */
export type PropertyValue = number | string | boolean;
/** Sparse map of property key → value (asset properties or scene-object overrides). */
export type PropertyBag = Record<string, PropertyValue>;
/** Writes `value` into the bag, or removes the key when the value is undefined (an undo of "no value"). */
/** `undefined` removes the key, which is how an undo of "no value" works. */
export function setBagValue(bag: PropertyBag, key: string, value: PropertyValue | undefined): void {
if (value === undefined) delete bag[key];
else bag[key] = value;
}
/** A point in world or screen space. */
export interface Vec2 {
x: number;
y: number;
}
/**
* Where a scene object sits: `x`/`y` in world units, `z` is the draw order. Higher `z` is
* drawn on top; objects with equal `z` keep their hierarchy order.
*/
/** `x`/`y` in world units; `z` is the draw order – higher is on top, ties keep hierarchy order. */
export interface Position extends Vec2 {
z: number;
}
export type Axis = keyof Position;
/** A full position from a 2D point (`z` = 0) or a position (copied). */
export function toPosition(point: Vec2 | Position): Position {
return { x: point.x, y: point.y, z: 'z' in point ? point.z : 0 };
}