public/javascript/application.js in rubrowser-0.2.0 vs public/javascript/application.js in rubrowser-0.2.1

- old
+ new

@@ -10,11 +10,11 @@ height = $svg.height(), drag = d3.drag() .on("start", dragstarted) .on("drag", dragged) .on("end", dragended), - constants = _.uniqWith(data.definitions.map(function(d){ return {id: d.namespace}; }), _.isEqual), + constants = _.uniqWith(data.definitions.map(function(d){ return {id: d.namespace, type: d.type }; }), _.isEqual), namespaces = constants.map(function(d){ return d.id; }), relations = data.relations.map(function(d){ return {source: d.caller, target: d.resolved_namespace }; }); relations = relations.filter(function(d){ return namespaces.indexOf(d.source) >= 0 && namespaces.indexOf(d.target) >= 0; @@ -58,9 +58,15 @@ .call(drag) .on("dblclick", dblclick), circle = node .append("circle") .attr("r", 6), + type = node + .append("text") + .attr("class", "type") + .attr("x", "-0.4em") + .attr("y", "0.4em") + .text(function(d) { return d.type[0]; }), text = node .append("text") .attr("x", 8) .attr("y", ".31em") .text(function(d) { return d.id; });