rubrowser 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 533883a63e4f0656b260f7495ea2a62acc82ef64
4
- data.tar.gz: 2bb665c87d91821898dc4e5965289291dc79809b
3
+ metadata.gz: 728b4572bf4dc170bbc4d88f8061622c79c8e1fe
4
+ data.tar.gz: e609c2523b14b57bce3c4fbc6a33cb294c0e0fb0
5
5
  SHA512:
6
- metadata.gz: 457739897ae0990378db89a4c8bdf95d6f5e21ff3d2b5bef310d21318e5c33f8216a0df006aa954710a8b0e32fce86995e8d7ac40e6439ff8bbd4d0c4ad38768
7
- data.tar.gz: 3923cc2724f4f0602ef7a8651ad84852274f4536f53c62ac8e9188d64573178b228cd3a7d31de109343522b9491ee8206976fd72b5d30b79c0565b2409093f2a
6
+ metadata.gz: 92a1ff49dc8f328dca9be9d07991b668ce11d2eb31bfdc95b60dca45f204aee6728444d6ba69a0f9f60219bc49a71d6e9201fd3b43e888e4afdde32a1ab2c98b
7
+ data.tar.gz: 7ca9bf3b48db3468e6b195e6760b79377c55563be0a08f0b82cc3066a63f02b133f5a65fa44486c8a5552115a58f1e20bff48e52e57f7acce669876e6ae2eb20
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubrowser (0.2.0)
4
+ rubrowser (0.2.1)
5
5
  parser (~> 2.3, >= 2.3.0)
6
6
 
7
7
  GEM
data/lib/rubrowser.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rubrowser
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
@@ -36,3 +36,7 @@ text {
36
36
  pointer-events: none;
37
37
  text-shadow: 0 1px 0 #fff, 1px 0 0 #fff, 0 -1px 0 #fff, -1px 0 0 #fff;
38
38
  }
39
+
40
+ text.type{
41
+ font: 7px sans-serif;
42
+ }
@@ -12,7 +12,7 @@ var parseGraph = function(data){
12
12
  .on("start", dragstarted)
13
13
  .on("drag", dragged)
14
14
  .on("end", dragended),
15
- constants = _.uniqWith(data.definitions.map(function(d){ return {id: d.namespace}; }), _.isEqual),
15
+ constants = _.uniqWith(data.definitions.map(function(d){ return {id: d.namespace, type: d.type }; }), _.isEqual),
16
16
  namespaces = constants.map(function(d){ return d.id; }),
17
17
  relations = data.relations.map(function(d){ return {source: d.caller, target: d.resolved_namespace }; });
18
18
 
@@ -60,6 +60,12 @@ var parseGraph = function(data){
60
60
  circle = node
61
61
  .append("circle")
62
62
  .attr("r", 6),
63
+ type = node
64
+ .append("text")
65
+ .attr("class", "type")
66
+ .attr("x", "-0.4em")
67
+ .attr("y", "0.4em")
68
+ .text(function(d) { return d.type[0]; }),
63
69
  text = node
64
70
  .append("text")
65
71
  .attr("x", 8)