Socket
Book a DemoInstallSign in
Socket

opal-raphael

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opal-raphael

0.0.2
bundlerRubygems
Version published
Maintainers
1
Created
Source

opal-raphael

Opal binding for Raphael.js.

Tested with Opal 0.6.2, Raphael 2.1.2.

Example

  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

  • Copy example/* to somewhere

  • Edit Gemfile

  • before: gem 'opal-raphael', path: '../'
  • after: gem 'opal-raphael'

Then you'll see:

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

FAQs

Package last updated on 10 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.