Instances of this class are used in place of regular member variables on other objects as a way to get dirty checking & undo functionality built into them, eg:
private _velocityTracker = new PropertyTracker<number>(100);get velocity(): number { return this._velocityTracker.value; }set velocity(value: number) { this._velocityTracker.value = value; }
Optional
The initial accepted value that the tracker gets instanciated with
The last accepted value
The most up-to-date value
Has the property changed since it was last accepted?
Accept changes made to the property, no longer hang on to the old property value
Undo changes made to the property, revert back to the last accepted property value
Generated using TypeDoc
Instances of this class are used in place of regular member variables on other objects as a way to get dirty checking & undo functionality built into them, eg: