macrocosm 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0b8067d051d80b5220ff4d7a5cb5461d0f3daa58460253ab449c91296e91b15
4
- data.tar.gz: 7d62c9cd1b6b1793349af9e4a412db2d97c6ea5ed3d44e67b5ab6bbdc1866143
3
+ metadata.gz: c4fcedd934d40198c6446ff36c8f09cbc29ac5c982f472a031316729373c7b25
4
+ data.tar.gz: 9d678fddefa777ca3c63424f05efc3d3db9eb7192c104a750d21ea91170603d6
5
5
  SHA512:
6
- metadata.gz: 5d51fbc69f2d3fe40c7df017e3e86d9ee547686f6434114eb88799379a796d57f8c2b88ef89595687a39bd1acb0e017bc2dd255dc01ee4a5ff4ee3146e433e8c
7
- data.tar.gz: 52a65a8c99c80f5b550f48218c8728d729d703c2e341e4e8d41dc1fb16b737b566004e6afc28ef50dcdc0c0ae741c8034959573f7558a939a9eda91859ed7fc0
6
+ metadata.gz: 5552dcd4f36fe1ca2def09ad45c2692107bce174b25ed709feb53d5689982f00c570c64b363d05e248879f171eedf213367de74ebb6f6d306b979e86f703524b
7
+ data.tar.gz: 892a2ddd35c9aeffbda4306e3854fd9bc2b2f0ad9a65a3b95def4e1b9f9f6bbb889660201dbede9248bc46a507fae04ac4d001ded8756bce3e696999e581dd44
@@ -16,11 +16,12 @@ class Macrocosm
16
16
  @last_curveness = Hash.new{ |h, k| h[k] = MaxCurveness.dup }
17
17
  end
18
18
 
19
- def add_link(source, target, relation_in_list: nil, relation_in_graph: nil)
19
+ def add_link(source, target, relation_in_list: nil, relation_in_graph: nil, line_style: {})
20
20
  ends = [source, target].sort!.join
21
21
 
22
22
  link = {
23
23
  ends: ends,
24
+ lineStyle: line_style,
24
25
  source: source,
25
26
  target: target
26
27
  }
@@ -33,7 +34,7 @@ class Macrocosm
33
34
 
34
35
  def links
35
36
  @links.map do |link|
36
- link[:lineStyle] = {curveness: calc_curveness(link)}
37
+ link[:lineStyle][:curveness] = calc_curveness(link)
37
38
  link.delete(:ends)
38
39
  link
39
40
  end
@@ -68,8 +69,14 @@ class Macrocosm
68
69
  }
69
70
  end
70
71
 
71
- def add_link(source, target, relation_in_list: nil, relation_in_graph: nil)
72
- @links.add_link(source, target, relation_in_list: relation_in_list, relation_in_graph: relation_in_graph)
72
+ def add_link(source, target, relation_in_list: nil, relation_in_graph: nil, line_style: {})
73
+ @links.add_link(
74
+ source,
75
+ target,
76
+ relation_in_list: relation_in_list,
77
+ relation_in_graph: relation_in_graph,
78
+ line_style: line_style
79
+ )
73
80
  end
74
81
 
75
82
  def to_s
@@ -306,7 +306,7 @@
306
306
 
307
307
  graph.links.forEach((link, i) => {
308
308
  if (checked_links.has(i)) {
309
- link.lineStyle.width = 10
309
+ link.lineStyle.width = 5
310
310
  link.lineStyle.opacity = 1
311
311
  } else {
312
312
  link.lineStyle.width = 1
@@ -1,3 +1,3 @@
1
1
  class Macrocosm
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: macrocosm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - ken