Created
November 27, 2013 11:26
-
-
Save brainwipe/7674220 to your computer and use it in GitHub Desktop.
How I would prefer drag() in Snap.svg to work, using a context with named parameters. This will not work in Snap.svg now!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is how I would like to use snap.svg's drag method: | |
var block = s.rect(x, y, 100, 100, 20, 20); | |
block.drag({ | |
ondrag: function(dragContext, event) { | |
// drag method here | |
} | |
onstart: function(dragContext, event) { | |
// drag start here | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Snap.svg http://snapsvg.io/
More detail on my blog: http://robsneuron.blogspot.co.uk/