Skip to content

zjr/raphael-amd

 
 

Repository files navigation

raphael-amd

About

AMD (requirejs) support for the fantastic Raphael vector graphic library

Uses Raphael.ninja() and define() wrappers to add AMD support to Raphael.

Essentially a copy of Chris Jensenuk's Raphael use in DrawSvg

This git repo is just several wrappers.

Usage

To use, add this repo as a git submodule in your project (or add the files however you want), and then include the path to raphael.amd in your require.config() paths. For example in your main.js

require.config({
// ...
paths: {
  // ...
  'eve':          '../vendor/eve.0.3.4',
  'raphael.core': '../vendor/raphael.2.1.0.core',
  'raphael.svg':  '../vendor/raphael.2.1.0.svg',
  'raphael.vml':  '../vendor/raphael.2.1.0.vml',
  'raphael':      '../vendor/raphael.2.1.0.amd',
  // ...

Now you can use raphael as a dependency in your defines and requires:

define(['raphael'], function(Raphael) {

or

require(['raphael'], function(Raphael) {

About

AMD (requirejs) support for Raphael

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%