feat(editor): give each Stock a unit
A Stock can carry a display unit (°C, people, $, …): a new optional field, an inspector text input, validation + round-trip in io, and a readout beside the live value on the canvas. Equip the demonstrative samples (Water L, Balance $, Coffee °C, Population/Epidemic people, Yeast cells). Also bumps the fill gauge opacity for a more vivid level.
This commit is contained in:
@@ -76,6 +76,8 @@ export interface StockNode extends BaseNode {
|
||||
name: string
|
||||
/** Initial accumulated quantity. Optional in the diagram phase; the simulator reads it. */
|
||||
initialValue?: number
|
||||
/** Unit of the quantity, e.g. "°C", "people", "$" — shown beside the value (display only). */
|
||||
unit?: string
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user