melonjs/melonJS — pull request #287 by Buffer-Overflow (2013-10-14 07:19:06+00:00)
Title: Drag and drop

- Added Draggable and Droptarget entities (started putting entities in separate files, to make it more modular).
- Updated multitouch example to make use of the Draggable module.
- Added new example for drag and drop demonstrating the different check methods (overlap and contains)
- Added Jasmine for creating functional tests. To test game functions, the test runner will start a test game in the background which we can use to test against. Added plugin for Jasmine which adds support for afterAll and beforeAll functions.
- Created first basic functional tests for Draggable and Droptarget

Notes:
To make it testable and flexible, the draggable entity transforms pointer events to minipubsub events, which it then responds to.
Because it makes modules portable, I've started to import (inject) needed dependencies into modules. This is also a first step to make better use of the module pattern, See also [this thread](https://groups.google.com/forum/#!topic/melonjs/-EJ0x0gRocY).