Created
June 29, 2010 09:28
-
-
Save bibhas/457012 to your computer and use it in GitHub Desktop.
This file contains 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
var r = Raphael(0, 0, 400, 600), | |
aRect = r.rect(10, 10, 100, 100), | |
aPath = r.path('M10,200 l100,0 l0,100 l-100,0 z'), | |
aText = r.text(200, 150, "Double click on the boxes to see what I mean."); | |
aRect.attr({'fill':'url("http://commondatastorage.googleapis.com/proto4/beltpattern4.png")'}); | |
aPath.attr({'fill':'url("http://commondatastorage.googleapis.com/proto4/beltpattern4.png")'}); | |
aRect.dblclick(function() { | |
this.animate({'translation':"100, 0"}, 1000); | |
}); | |
aPath.dblclick(function() { | |
this.animate({'translation':"100, 0"}, 1000); | |
}); | |
// Issue: Pattern applied on the path doesn't translate with the path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment