Hi,
Look bellow :
<img src="http://www.programaths.be/construct/fora/snap.png" border="0" />
dragging is a global variable. That permit to not process sub event in case nothing is dragged.
As there is not familly "yet", I had to copy-past this for each shape.
The "magic" is done in "set position".
floor take the nearest integer to 0. So "3.5" become "3".
We want to map : "A.B" to cell "A". So, floor does it well.