Permalink
Browse files

- release 0.0.1

  • Loading branch information...
wout fierens
wout fierens committed Dec 1, 2009
1 parent b1fa1a1 commit 265d4d833e3ca6bfb7f91158e2d3abab7952309e
Showing with 5,063 additions and 0 deletions.
  1. 0 README
  2. +20 −0 README.markdown
  3. +37 −0 demo/demo.html
  4. +24 −0 lib/onresize.js
  5. +4,874 −0 lib/prototype.js
  6. +7 −0 lib/raphael-min.js
  7. +20 −0 src/demo.js
  8. +81 −0 src/raphael-svg-import.js
0 README
No changes.
@@ -0,0 +1,20 @@
# Raphaël SVG import plugin - 0.0.1
### What is it?
An extension to the Raphael Vector Library.
It enables Raphael to import raw SVG data.
### Dependencies
- [Raphael JS](http://raphaeljs.com/)
- [Prototype JS](http://prototypejs.org/)
### Important
- This plugin is still under development
- It requires the Prototype JS library
### To-do
- SVG group to Raphael set conversion
- line recognition
- text recognition
- image recognition
- writing tests (yes I've been lazy :-)
@@ -0,0 +1,37 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Raphael SVG Import - Interactive demo</title>
<style type="text/css" media="screen">
body, html {
margin: 0;
padding: 0;
background-color: #fff;
height: 100%;
}
#paper {
width:100%;
height: 100%;
}
#buttons {
position: absolute;
right: 10px;
top: 10px;
}
</style>
</head>
<body>
<div id="paper"></div>
<div id="buttons">
<input type="button" name="import" value="Import SVG" class="button" onclick="Demo.importSVG()" />
</div>
</body>
<script src="../lib/prototype.js" type="text/javascript" charset="utf-8"></script>
<script src="../lib/onresize.js" type="text/javascript" charset="utf-8"></script>
<script src="../lib/raphael-min.js" type="text/javascript" charset="utf-8"></script>
<script src="../src/raphael-svg-import.js" type="text/javascript" charset="utf-8"></script>
<script src="../src/demo.js" type="text/javascript" charset="utf-8"></script>
</html>
@@ -0,0 +1,24 @@
/*
* onResize 0.0.1 - Extension to Prototype JS
*
* Copyright (c) 2009 Wout Fierens
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
*/
Object.extend(window, {
fire: Element.Methods.fire.methodize(),
observe: Element.Methods.observe.methodize(),
stopObserving: Element.Methods.stopObserving.methodize()
});
(document.onresize ? document : window).observe("resize", function() {
if (!document.viewport.is_resized) {
document.viewport.is_resized = true;
window.fire("resize:start");
resizeEnd = (function() {
document.viewport.is_resized = false;
window.fire("resize:end");
Event.stopObserving(document, "mousemove");
}).bind(this);
document.observe("mousemove", resizeEnd);
}
});
Oops, something went wrong.

0 comments on commit 265d4d8

Please sign in to comment.