code: function() {
  			// Stack for all the undo and redo snapshots, they're always created/removed
  			// in consistency.
  			this.snapshots = [];
  
  			// Current snapshot history index.
  			this.index = -1;
  
  			this.currentImage = null;
  
  			this.hasUndo = false;
  			this.hasRedo = false;
  			this.locked = null;
  
  			this.resetType();
  		}
docs: Resets the undo stack.