Appearance
Selection details
in P_Attributes
there are several kinds of attributes:
- plain value -> only reverse propagation alters it (IMPLIED)
- locked value -> NEVER change the value unless user edits the value cell (DIRECT)
- formula driven value (includes invariants) -> always compute the value from the formula (DERIVE)
done
- remove "Name" label
- shorten input field and move add child button to same line, at right of input
- contents corresponds to selected SO
- add a table below input with 9 rows and three columns
- first column is attribute names (x, X, w, y, Y, h, z, Z, d)
- second column is algebraic formula
- third column is value computed from formula, expressed in current units
- add another table with 3 rows and 2 columns
- first column is axis name (x, y, z)
- second column is angle (in degrees, with 1/2 degree precision)
- editing affects SO (TBD)
- create a new class runtime/Axis.ts
- four attributes (start, end, length, angle)
- a column to designate which attribute (of each three-attribute set) depends on the other two
- eg, if w = X - x, the w is dependent
Lock feature
A new right-most column in the attributes table lets the user lock a plain numeric attribute so its value is held still during drag operations. Each row falls into one of three states.
- Has a formula, or is the invariant cell. The right-most column is empty. Cannot be locked.
- Plain numeric, unlocked. The cell shows a small writing-hand glyph. Drag-edits and reverse-propagation can write to this attribute as usual.
- Plain numeric, locked. The cell shows a small lock glyph. Drag-edits and reverse-propagation cannot write to this attribute. The value can still be changed by the user typing directly into the value cell.
Click the lock cell to flip between locked and unlocked. The change saves to the scene file immediately.
Two automatic transitions keep the lock state consistent with the rest of the model.
- Setting a formula on an attribute clears its lock.
- Marking an attribute as the invariant clears its lock.
The lock state is saved with the scene. A plain unlocked attribute saves as a bare number, same as before. A locked attribute, or any attribute with a formula, saves as a small bundle of facts including the lock state when on.
The runtime change-blocker sits at the single point where the formula-solver writes a number into a free constant. If that constant's owning attribute is locked, the write is silently refused. The drag chooser, which probes each candidate by nudging it and watching for a response, will see no response from a locked candidate and skip past it.