Add save function in board to save a snapshot (a new SQL table, TODO: deploy this table). In manager, the board is saved in update_data time to time. The init function for view (snapshot) can start the view in an earlier state, with the requested date attribute (if date >= 0, it is relative to the start of the game, if date < -1, it is relative to now).
Bug fixes: Snapshot.session property is a String, not an Integer. Time, stroke_max and event_max errors in manager.snapshot, and we must retrieve all the user associated to a session, not only the not expired. Board saving moved from manager to board.
In viewer init operation (snapshot), add strokes between the last known snapshot and the asked stroke.
Some comments added, get view state when there is no found snapshot.
In view_session.js, _restart removed.
Many changes related to: renaming of snapshot to snapshot_board, new functions in boarb to create the state of the game in the past. Optimization: Zone.to_desc_hash can be partially generated for updates requests (we don't need full informations about zones).
Removing strokes from view session init, there are included in zones. New functions in Zone to create a Zone from hash.
Separating zone initializator and database saving. Adding forgotten 'event' parameters to create a board snapshot.
Adding slider in view and useful values in core to set the range and the value of this slider.
User interaction with the slider now works.
Hide/show the slider. Add a wait request property to have a pseudo-real time execution. Clear remaining strokes in the viewer when the user seek.
Remove 'wait' response field for play request, replaced by a client-side timer and a new request field named 'since_stroke' which indicate from which stroke we want to compute the diffstamps. Slider management moved into a new file called slider.js.
slider.js file was forgotten in the previous commit.
Because there can be several defered strokes, the _timer attribute in slider and viewer is now an array of timers. Bugs fixed: the first update was called 1 ms after the init instead of 1 second; _last_update_timestamp is now updated when the user change the slider position.
jslint on js code.
Switching to real time when the slider cursor is at the end.
Client side: in view_session 'setTimer' and 'clearTimer' functions are renamed without camelCase ('set_timer' and 'clear_timer'). Because of the user interaction, old server responses are discarded by the client if there are new requests.
When an old board is requested, events are now applied to the result. Separation between the live view and the history view in the server because the play response can use the current board instead of an old board.
Using the same time range to list events as strokes for 'play' requests in the past.
Fixing bug when events are applied in Board.load_board.