Leimi/drawingboard.js — pull request #37 by mattjmattj (2014-09-28 22:38:18+00:00)
Title: Fix for issue #29 + some basic updates

To fix the bug described in issue #29 I first had to update a couple of things (version in package.json, path to jquery in example page, etc.)

The actual fix consists in basically two things:
* _externalizing the "history" part_. I created a very simple component called [simple-undo](https://github.com/mattjmattj/simple-undo) to do so and I added it as bower dependency. I then integrated it everywhere in `js/board.js` and `js/controls/navigation.js`. The major thing I intended to do with externalizing the history part was to fix some strange behaviors implied by the direct use of the history position, in navigation for example, and the lack of an "initial state". Please notice that this integration induces two important changes :
* history event `historyNavigation` does not send the current position anymore.
* resetting the background does not save a new state in history anymore, but saves the initial state
* _fixing DrawingBoard.Board.setImg_ `DrawingBoard.Board.setImg` performs an asynchronous treatment. Indeed it loads an image and then uses it as a background. Calling `setImg`and then callling `getImg` will not get the expected image. So I added a callback parameter in setImg and changed wherever something was called after a call to setImg