@zeainc/zea-ux
Version:
59 lines • 1.92 kB
TypeScript
import { TreeItem, Xfo } from '@zeainc/zea-engine';
import Change from '../Change';
/**
* Represents a `Change` class for storing `Parameter` values.
*
* **Events**
* * **updated:** Triggered when the `SelectionXfoChange` value is updated.
*
* @extends Change
*/
declare class SelectionXfoChange extends Change {
supressed: boolean;
treeItems: TreeItem[];
baseXfo: Xfo;
localXfos: Xfo[];
prevValues: Xfo[];
newValues: Xfo[];
/**
* Creates an instance of SelectionXfoChange.
*
* @param param - The Parameter object that is modified by this change.
* @param newValue - The newValue value.
*/
constructor(treeItems: TreeItem[], baseXfo: Xfo);
setDeltaXfo(delta: Xfo): void;
setDone(): void;
/**
* Rollbacks the value of the parameter to the previous one, passing it to the redo stack in case you wanna recover it later on.
*/
undo(): void;
/**
* Rollbacks the `undo` action by moving the change from the `redo` stack to the `undo` stack
* and updating the parameter with the new value.
*/
redo(): void;
/**
* Updates the state of the current parameter change value.
*
* @param updateData - The updateData param.
*/
update(updateData: Record<string, any>): void;
/**
* Serializes `Parameter` instance value as a JSON object, allowing persistence/replication.
*
* @param context - The context param.
* @return {object} The return value.
*/
toJSON(context: Record<any, any>): Record<any, any>;
/**
* Restores `Parameter` instance's state with the specified JSON object.
*
* @param j - The j param.
* @param context - The context param.
*/
fromJSON(j: Record<any, any>, context: Record<any, any>): void;
}
export default SelectionXfoChange;
export { SelectionXfoChange };
//# sourceMappingURL=SelectionXfoChange.d.ts.map