(startGen)
| 7635 | // HISTORY |
| 7636 | |
| 7637 | function History(startGen) { |
| 7638 | // Arrays of change events and selections. Doing something adds an |
| 7639 | // event to done and clears undo. Undoing moves events from done |
| 7640 | // to undone, redoing moves them in the other direction. |
| 7641 | this.done = []; this.undone = []; |
| 7642 | this.undoDepth = Infinity; |
| 7643 | // Used to track when changes can be merged into a single undo |
| 7644 | // event |
| 7645 | this.lastModTime = this.lastSelTime = 0; |
| 7646 | this.lastOp = this.lastSelOp = null; |
| 7647 | this.lastOrigin = this.lastSelOrigin = null; |
| 7648 | // Used by the isClean() method |
| 7649 | this.generation = this.maxGeneration = startGen || 1; |
| 7650 | } |
| 7651 | |
| 7652 | // Create a history change event from an updateDoc-style change |
| 7653 | // object. |
nothing calls this directly
no outgoing calls
no test coverage detected