forked from DmitryBaranovskiy/raphael
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Small bug fix and Node.js test script
- Loading branch information
1 parent
0ae7e67
commit d9f2c62
Showing
3 changed files
with
26 additions
and
1 deletion.
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
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
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,16 @@ | ||
Raphael = require('.'); | ||
var jsdom = require('jsdom'); | ||
var doc = jsdom.jsdom("<html><head></head><body></body></html>"); | ||
var win = doc.createWindow(); | ||
Raphael.setWindow(win); | ||
|
||
paper = Raphael(0, 0, 640, 480); | ||
|
||
paper.clear(); | ||
paper.text("Hello, world!"); | ||
paper.circle(320, 240, 60); | ||
|
||
console.log("You should see valid SVG XML here:\n"); | ||
console.log(doc.body.firstChild.outerHTML) | ||
|
||
|