Opal binding for Raphael.js.
Tested with Opal 0.6.2, Raphael 2.1.2.
paper = Raphael(0, 0, 600, 600) background = paper.rect(0, 0, 600, 600) background.attr("fill", "#efefef") background.attr("stroke", "#efefef")
See example/app/application.rb for full example.
- Can render circle and rect
eveare not supported (Waiting for your pull request!)
See opal/opal-raphael.rb for list of supported methods.
- (Note1: some of the methods may return raw JS object.
It should be wrapped with
- (Note2: method names are intentionally kept lowerCamelCase, so that you can find corresponding Opal method easily)
Copy example/* to somewhere
gem 'opal-raphael', path: '../'
bundle exec rackup
Then you'll see:
Currently does not work well with opal-jquery (see https://github.com/opal/opal/issues/547 )
- v0.0.2 (2014/06/10)
- Add some methods
- v0.0.1 (2014/06/10)
- initial release