import { SpreadsheetVertex } from './spreadsheet_vertex'; import { Color } from './vertex'; /** * second specialization of vertex: this class is for non-cell elements * that are dependent on cells: specifically, charts. * * we want leaf vertices to participate in the normal dirty/calculate * cycle, but they don't need to do any calculation other than checking * if the underlying data has changed. we should maintain some state so * this is a simple check for observers. * * leaves specifically do not have addresses. we can represent the chart * as a calculation, however. (...) * * FIXME: it might be better to have an intermediate class/interface and * have both leaf- and spreadsheet-vertex extend that. * * UPDATE: we're removing the internal "state" representation because (1) * it should be unnecessary, if we are only updating when dependencies * change, and (2) it was broken anyway. * * Now we rely on the calculation graph to indicate when the leaf is * dirty and needs to update. This will result in extra calculation when * you do a hard recalc, but that seems reasonable (and we could possibly * work around that). * */ export declare class StateLeafVertex extends SpreadsheetVertex { static type: string; state_id: number; type: string; /** * leaf vertex defaults to black (i.e. tested) because leaf nodes cannot have * outbound edges. it is still possible to change this, because it's a property * and we can't override the set accessor, but making it an accessor in the * superclass just for this purpose is not worthwhile since regular vertices * should vastly outnumber leaves. */ color: Color; /** overrides calculate function */ Calculate(): void; AddDependent(): void; }