| Package | weavejs.core |
| Class | public class SessionStateLog |
| Inheritance | SessionStateLog Object |
| Implements | ILinkableVariable, IDisposableObject |
| Property | Defined By | ||
|---|---|---|---|
| debug : Boolean = false [static] | SessionStateLog | ||
| enableHistoryRewrite : Boolean = true [static] | SessionStateLog | ||
| redoHistory : Array [read-only]
| SessionStateLog | ||
| undoHistory : Array [read-only]
| SessionStateLog | ||
| Method | Defined By | ||
|---|---|---|---|
SessionStateLog(subject:ILinkableObject, syncDelay:uint = 0) | SessionStateLog | ||
clearHistory(directional:int = 0):void
This will clear all undo and redo history. | SessionStateLog | ||
dispose():void | SessionStateLog | ||
getSessionState():Object
This will generate an untyped session state object that contains the session history log. | SessionStateLog | ||
redo(numberOfSteps:int = 1):void
This will redo a number of steps that have been previously undone. | SessionStateLog | ||
setSessionState(state:Object):void
This will load a session state log from an untyped session state object. | SessionStateLog | ||
squashHistory(directionalSquashCount:int):void
This will squash a sequence of undos or redos into a single undo or redo. | SessionStateLog | ||
synchronizeNow():void
This function will save any pending diff in session state. | SessionStateLog | ||
undo(numberOfSteps:int = 1):void
This will undo a number of steps from the saved history. | SessionStateLog | ||
| Constant | Defined By | ||
|---|---|---|---|
| enableLogging : LinkableBoolean
When this is set to true, changes in the session state of the subject will be automatically logged. | SessionStateLog | ||
| debug | property |
public static var debug:Boolean = false| enableHistoryRewrite | property |
public static var enableHistoryRewrite:Boolean = true| redoHistory | property |
redoHistory:Array [read-only]
public function get redoHistory():Array| undoHistory | property |
undoHistory:Array [read-only]
public function get undoHistory():Array| SessionStateLog | () | Constructor |
public function SessionStateLog(subject:ILinkableObject, syncDelay:uint = 0)subject:ILinkableObject | |
syncDelay:uint (default = 0) |
| clearHistory | () | method |
public function clearHistory(directional:int = 0):voidThis will clear all undo and redo history.
Parameters
directional:int (default = 0) — Zero will clear everything. Set this to -1 to clear all undos or 1 to clear all redos.
|
| dispose | () | method |
public function dispose():void| getSessionState | () | method |
public function getSessionState():ObjectThis will generate an untyped session state object that contains the session history log.
ReturnsObject — An object containing the session history log.
|
| redo | () | method |
public function redo(numberOfSteps:int = 1):voidThis will redo a number of steps that have been previously undone.
Parameters
numberOfSteps:int (default = 1) — The number of steps to redo.
|
| setSessionState | () | method |
public function setSessionState(state:Object):voidThis will load a session state log from an untyped session state object.
Parameters
state:Object — The ByteArray containing the output from seralize().
|
| squashHistory | () | method |
public function squashHistory(directionalSquashCount:int):voidThis will squash a sequence of undos or redos into a single undo or redo.
Parameters
directionalSquashCount:int — Number of undos (negative) or redos (positive) to squash.
|
| synchronizeNow | () | method |
public function synchronizeNow():voidThis function will save any pending diff in session state. Use this function only when necessary (for example, when writing a collaboration service that must synchronize).
| undo | () | method |
public function undo(numberOfSteps:int = 1):voidThis will undo a number of steps from the saved history.
Parameters
numberOfSteps:int (default = 1) — The number of steps to undo.
|
| enableLogging | Constant |
public const enableLogging:LinkableBooleanWhen this is set to true, changes in the session state of the subject will be automatically logged.