This repository has been archived by the owner on Jul 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wout fierens
committed
Dec 1, 2009
1 parent
b1fa1a1
commit 265d4d8
Showing
8 changed files
with
5,063 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 :-) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.