﻿// -----------------------------------------------------------------
//   Description:
//	 Class that handles history events on behalf of the model
//   
//   Usage:
//   var historyEventHandler = new HistoryEventHandler();
//   subscribe(historyEventHandler);
// -----------------------------------------------------------------

function HistoryEventHandler()
{
}

// -----------------------------------------------------------------
// Function onHistoryChanged
// Author:		Nathan Derksen
// Description:	Respond to a change in history by setting new page state
// Inputs:		<Number> newHistoryIndex - The index of the history snapshot to be displayed
//				<Object> newState - The state snapshot representing the state to represent
// Returns:		<nothing>
// -----------------------------------------------------------------
HistoryEventHandler.prototype.onHistoryChanged = function(newHistoryIndex, newState)
{
	ProductModel.getInstance().setStateSnapshot(newState);
};
