Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yhara/opal-raphael
Opal binding for Raphael.js
https://github.com/yhara/opal-raphael
Last synced: 2 months ago
JSON representation
Opal binding for Raphael.js
- Host: GitHub
- URL: https://github.com/yhara/opal-raphael
- Owner: yhara
- Created: 2014-06-10T04:05:19.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-06-10T08:32:27.000Z (over 10 years ago)
- Last Synced: 2024-07-17T02:33:55.526Z (6 months ago)
- Language: Ruby
- Homepage: https://github.com/yhara/opal-raphael
- Size: 160 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-opal - Opal Raphael - Opal binding for Raphael.js (Uncategorized / Uncategorized)
README
opal-raphael
============Opal binding for [Raphael.js](http://raphaeljs.com/).
Tested with Opal 0.6.2, Raphael 2.1.2.
Example
-------```ruby
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.
Status
------Early alpha
* Can render circle and rect
* `Animation`, `Matrix`, `Raphael.*`, `Set`, `eve` are 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 `Raphael::Element`, etc.)
* (Note2: method names are intentionally kept lowerCamelCase, so that
you can find corresponding Opal method easily)Getting started
---------------1. Copy example/* to somewhere
2. Edit Gemfile
* before: `gem 'opal-raphael', path: '../'`
* after: `gem 'opal-raphael'`3. `bundle install`
4. `bundle exec rackup`
5. Open http://localhost:9292/
Then you'll see:
![](http://gyazo.com/6c9965d12d5ad8f10667e81281866f5f.png)
Caveats
-------Currently does not work well with opal-jquery (see https://github.com/opal/opal/issues/547 )
History
-------* v0.0.2 (2014/06/10)
* Add some methods
* v0.0.1 (2014/06/10)
* initial release