graphviz
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -147,2 +147,3 @@ var Hash = require('./core_ext/hash').Hash, | ||
"stylesheet" : { "usage" : "G", "type" : "string" }, | ||
"tail_lp" : { "usage" : "E", "type" : "pointf" }, | ||
"tailURL" : { "usage" : "E", "type" : "escString" }, | ||
@@ -195,4 +196,7 @@ "tailclip" : { "usage" : "E", "type" : "bool" }, | ||
function quoteMe(attr, value) { | ||
if(mustBeQuoted(attr)) { | ||
return('"' + value + '"'); | ||
if(value[0] === '!') { | ||
return ('<' + value.substr(1,1000) + '>'); | ||
} | ||
else if(mustBeQuoted(attr)) { | ||
return(' "' + value + '"'); | ||
} else { | ||
@@ -243,4 +247,6 @@ return(value); | ||
for(var name in this.attributs.items) { | ||
attrsOutput = attrsOutput + sep + name + " = " + quoteMe(name, this.attributs.items[name]); | ||
sep = ", "; | ||
if (this.attributs.items.hasOwnProperty(name)) { | ||
attrsOutput = attrsOutput + sep + name + " =" + quoteMe(name, this.attributs.items[name]); | ||
sep = ", "; | ||
} | ||
} | ||
@@ -247,0 +253,0 @@ attrsOutput = attrsOutput + " ]"; |
@@ -32,2 +32,3 @@ /** | ||
this.attributs.set(name, value); | ||
return this; | ||
}; | ||
@@ -34,0 +35,0 @@ |
@@ -264,3 +264,5 @@ /** | ||
for( var id in this.clusters.items ) { | ||
dotScript = dotScript + this.clusters.items[id].to_dot() + '\n' | ||
if (this.clusters.items.hasOwnProperty(id)) { | ||
dotScript = dotScript + this.clusters.items[id].to_dot() + '\n'; | ||
} | ||
} | ||
@@ -270,3 +272,5 @@ | ||
for( var id in this.nodes.items ) { | ||
dotScript = dotScript + ' ' + this.nodes.items[id].to_dot() + ';\n' | ||
if (this.nodes.items.hasOwnProperty(id)) { | ||
dotScript = dotScript + ' ' + this.nodes.items[id].to_dot() + ';\n' | ||
} | ||
} | ||
@@ -276,3 +280,5 @@ | ||
for( var i in this.edges ) { | ||
dotScript = dotScript + ' ' + this.edges[i].to_dot() + ';\n' | ||
if (this.edges.hasOwnProperty(i)) { | ||
dotScript = dotScript + ' ' + this.edges[i].to_dot() + ';\n' | ||
} | ||
} | ||
@@ -279,0 +285,0 @@ |
@@ -38,2 +38,3 @@ /** | ||
this.attributs.set(name, value); | ||
return this; | ||
}; | ||
@@ -40,0 +41,0 @@ |
@@ -29,3 +29,3 @@ /** | ||
* @return {Graph} | ||
* @api public | ||
* @api public | ||
*/ | ||
@@ -35,3 +35,3 @@ exports.digraph = function(id) { | ||
graph.type = 'digraph'; | ||
return graph; | ||
return graph; | ||
}; | ||
@@ -58,4 +58,4 @@ | ||
if(code !== 0 || __graph_eval === undefined) { | ||
if(errback) { | ||
errback(code, out, err); | ||
if(errback) { | ||
errback(code, out, err); | ||
} | ||
@@ -73,3 +73,3 @@ } else { | ||
* @param {Function} errback | ||
* @api public | ||
* @api public | ||
*/ | ||
@@ -81,5 +81,15 @@ exports.parse = function(file_or_script, callback, errback) { | ||
temp.open('node-graphviz', function(err, info) { | ||
fs.write(info.fd, file_or_script); | ||
fs.close(info.fd, function(err) { | ||
_parse(info.path, callback, errback); | ||
if(err) { | ||
return errback(err); | ||
} | ||
fs.write(info.fd, file_or_script, function(err) { | ||
if(err) { | ||
return errback(err); | ||
} | ||
fs.close(info.fd, function(err) { | ||
if(err) { | ||
return errback(err); | ||
} | ||
_parse(info.path, callback, errback); | ||
}); | ||
}); | ||
@@ -86,0 +96,0 @@ }); |
{ | ||
"name" : "graphviz", | ||
"version" : "0.0.8", | ||
"author": "Gregoire Lejeune <gregoire.lejeune@free.fr> (http://algorithmique.net/)", | ||
"description" : "Node.js interface to the GraphViz graphing tool", | ||
"homepage" : "http://algorithmique.net/", | ||
"contributors" : [ | ||
"Gregoire Lejeune (http://algorithmique.net)", | ||
"Mathieu Ravaux (http://mathieuravaux.com)" | ||
], | ||
"repository" : { | ||
"type" : "git", | ||
"url" : "http://github.com/glejeune/node-graphviz.git" | ||
}, | ||
"keywords" : ["graphviz", "dot"], | ||
"directories" : { "lib" : "./lib" }, | ||
"main" : "lib/graphviz", | ||
"engines": { | ||
"node": ">=0.6.8" | ||
}, | ||
"dependencies": { | ||
"temp": "~0.4.0" | ||
}, | ||
"devDependencies": {} | ||
"name": "graphviz", | ||
"version": "0.0.9", | ||
"author": "Gregoire Lejeune <gregoire.lejeune@free.fr> (http://algorithmique.net/)", | ||
"description": "Node.js interface to the GraphViz graphing tool", | ||
"homepage": "http://algorithmique.net/", | ||
"license": "GPL-3.0", | ||
"contributors": [ | ||
"Gregoire Lejeune (http://algorithmique.net)", | ||
"Mathieu Ravaux (http://mathieuravaux.com)" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "http://github.com/glejeune/node-graphviz.git" | ||
}, | ||
"keywords": ["graphviz", "dot"], | ||
"directories": { | ||
"lib": "./lib" | ||
}, | ||
"main": "lib/graphviz", | ||
"engines": { | ||
"node": ">=0.6.8" | ||
}, | ||
"dependencies": { | ||
"temp": "~0.4.0" | ||
}, | ||
"devDependencies": {} | ||
} |
@@ -16,6 +16,8 @@ var util = require('util'), | ||
// Add edge between the two nodes | ||
var e = g.addEdge( n1, "World" ); | ||
e.set( "color", "red" ); | ||
g.addEdge(n1, "World") | ||
.set("color", "red") | ||
.set("label", "A label") | ||
.set("fontsize", "10"); | ||
// Generate a PNG output | ||
g.output( "png", "hello_world.png" ); |
@@ -9,4 +9,4 @@ var util = require('util'), | ||
var n1 = g.addNode( "Hello" ); | ||
n1.set( "color", "blue" ); | ||
n1.set( "style", "filled" ); | ||
n1.set( "color", "blue" ) | ||
.set( "style", "filled" ); | ||
@@ -13,0 +13,0 @@ // Add node (ID: World) |
Copyleft License
License(Experimental) Copyleft license information was found
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
72068
27
3
70
1378
99