docs(compiler): fix variable scope in drag sample
Note that without this fix, if you add a second draggable element, the two instances clobber each other since there is only one set of startx/starty/x/y variables. Here is an example: http://plnkr.co/edit/aGrLXcIo2SuaePuAdfmQ?p=preview. On the surface it looks like it would be fine because you only have one mouse but in practice the start position jumps when you start dragging. Here it is fixed: http://plnkr.co/edit/VuvPasuumtCeiVRisYKQ?p=preview
K
Keir Mierle committed
8c75b5f55aa80e03c455e1efcdba216f1e51bd05
Parent: 2d66ccd
Committed by Pete Bacon Darwin <pete@bacondarwin.com>
on 4/22/2013, 11:52:08 AM