hyper-vis 1.0.0.lap27 → 1.0.0.lap28

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
  SHA256:
3
- metadata.gz: 7ede951b3499ae42da49b376e7de770a63e8157deb0bb0a3dacd67aae88c76ab
4
- data.tar.gz: 87900a67da3127c3e15d24efe822d9ca7d7a1950fdb7214fb5323542cd33750d
3
+ metadata.gz: 7bea13d14dc540c492236959cd126c99ed1698f6a42e1260cb293445b4837e56
4
+ data.tar.gz: '0409e01c7632eeef3d17220eab96c8c6252e132694d4bafe3a1990fa06c76b1e'
5
5
  SHA512:
6
- metadata.gz: 86542b71a0a62b06929b049634bebb9391ca68fca5caaa224bdb57fd100419450fe07b30548796f08ca1107a50c8579d50c3c7034962a9cdde0a842cd22a657a
7
- data.tar.gz: afaa1c901e2497839bfca6ce2f441f105cf39945f9a62f1b898c6e11ae438819f1862910855b3ea3f02de3e1ef1aba2ad070b93f9d72110b138db1f333b894a9
6
+ metadata.gz: 27cc2b94166c5cbf633ebf40612b53df09f979ba022ec8dbd5ed6b4b616d9abf49174744202aaf28d4069b97f79e98b507638a8cf64cd804133a7bc8aeb2b42c
7
+ data.tar.gz: 764a0aaefcf31684fee9b1599a12ec007b7e4e857d45f5908247d5de0526a685c9cd780b028feed695ff921d4d607ff5e15646d33119e1794e6bc365ab2e8e43
@@ -1,5 +1,5 @@
1
1
  module Hyperloop
2
2
  module Vis
3
- VERSION = '1.0.0.lap27'
3
+ VERSION = '1.0.0.lap28'
4
4
  end
5
5
  end
@@ -171,33 +171,33 @@ module Vis
171
171
  end
172
172
  end
173
173
  end
174
- end
175
174
 
176
- def _rubyfy_nodes_options(options)
177
- if options[:nodes].has_key?(:chosen)
178
- chosen = options[:nodes][:chosen]
179
- [:node, :label].each do |key|
180
- if chosen.has_key?(key)
181
- block = chosen[key]
182
- if `typeof block === "function"`
183
- options[:nodes][:chosen][key] = %x{
184
- function(values, id, selected, hovering) {
185
- return #{block.call(`Opal.Hash.$new(values)`, `id`, `selected`, `hovering`)};
175
+ def _rubyfy_nodes_options(options)
176
+ if options[:nodes].has_key?(:chosen)
177
+ chosen = options[:nodes][:chosen]
178
+ [:node, :label].each do |key|
179
+ if chosen.has_key?(key)
180
+ block = chosen[key]
181
+ if `typeof block === "function"`
182
+ options[:nodes][:chosen][key] = %x{
183
+ function(values, id, selected, hovering) {
184
+ return #{block.call(`Opal.Hash.$new(values)`, `id`, `selected`, `hovering`)};
185
+ }
186
186
  }
187
- }
187
+ end
188
188
  end
189
189
  end
190
190
  end
191
- end
192
- if options[:nodes].has_key?(:scaling)
193
- if options[:nodes][:scaling].has_key?(:custom_scaling_function)
194
- block = options[:nodes][:scaling][:custom_scaling_function]
195
- if `typeof block === "function"`
196
- options[:nodes][:scaling][:custom_scaling_function] = %x{
197
- function(min, max, total, value) {
198
- return #{block.call(`min`, `max`, `total`, `value`)};
191
+ if options[:nodes].has_key?(:scaling)
192
+ if options[:nodes][:scaling].has_key?(:custom_scaling_function)
193
+ block = options[:nodes][:scaling][:custom_scaling_function]
194
+ if `typeof block === "function"`
195
+ options[:nodes][:scaling][:custom_scaling_function] = %x{
196
+ function(min, max, total, value) {
197
+ return #{block.call(`min`, `max`, `total`, `value`)};
198
+ }
199
199
  }
200
- }
200
+ end
201
201
  end
202
202
  end
203
203
  end
@@ -45,7 +45,22 @@ describe 'Vis::Network', js: true do
45
45
  created = dom_node.JS[:children].JS[:length]
46
46
  error = false
47
47
  begin
48
- net.set_options(autoresize: true)
48
+ net.set_options({
49
+ :autoResize => true,
50
+ :locale => 'en',
51
+ :nodes => {
52
+ :scaling => {
53
+ :min => 16,
54
+ :max => 32
55
+ },
56
+ :shadow => true
57
+ },
58
+ :edges => {
59
+ :color => "#ff0000",
60
+ :smooth => false,
61
+ :shadow => true
62
+ }
63
+ })
49
64
  rescue
50
65
  error = true
51
66
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyper-vis
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.lap27
4
+ version: 1.0.0.lap28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann