(startGen)
| 7866 | // HISTORY |
| 7867 | |
| 7868 | function History(startGen) { |
| 7869 | // Arrays of change events and selections. Doing something adds an |
| 7870 | // event to done and clears undo. Undoing moves events from done |
| 7871 | // to undone, redoing moves them in the other direction. |
| 7872 | this.done = []; this.undone = []; |
| 7873 | this.undoDepth = Infinity; |
| 7874 | // Used to track when changes can be merged into a single undo |
| 7875 | // event |
| 7876 | this.lastModTime = this.lastSelTime = 0; |
| 7877 | this.lastOp = this.lastSelOp = null; |
| 7878 | this.lastOrigin = this.lastSelOrigin = null; |
| 7879 | // Used by the isClean() method |
| 7880 | this.generation = this.maxGeneration = startGen || 1; |
| 7881 | } |
| 7882 | |
| 7883 | // Create a history change event from an updateDoc-style change |
| 7884 | // object. |
nothing calls this directly
no outgoing calls
no test coverage detected