rbbt-rest 1.8.0 → 1.8.1

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
  SHA1:
3
- metadata.gz: 33b3e5b0e58772dc57de97948285d38035eccbec
4
- data.tar.gz: a8b907196c822fed834fe8c7ef116b68a78ea74e
3
+ metadata.gz: e5a15e2401428dad996aad8a55691eafbdb1072e
4
+ data.tar.gz: ab4a0ab01e3f193522dfb07780e2a753eb346c71
5
5
  SHA512:
6
- metadata.gz: 9b1b63cb4665226a0ece4345bec78f3cb74885ac003a1e3eb3d31f999f28060d49cc79cc490106752465af7d177b9b805c5f5ff3d7bd2a72a79509c5e7185073
7
- data.tar.gz: e27f644d02bb2745e6295cb989ad4f0dfaf06dc59ed7d3f07bbe05f0049cd303560ec985819f53ddd3dc8a2ead90f1e18d413caa046001adeef6d96e5a758c2a
6
+ metadata.gz: 956ef3ffb42a95aa91fe3d04afcc1c2f1759c98fb17008669889ce254fd9476e9aa8cc1d4b44a8cdd08ff736208f3b06532b22f36ec1ac52750b9e05f18e6a21
7
+ data.tar.gz: 5243450b240ae44c7b24f53c79f4527acaa014a8e88000402cbbba5daac5462dccb4ceb20c83e5ab202c9d9594d67ceca0904717938263b3e67b71f90779e810
@@ -79,7 +79,7 @@ function require_js(url, success, script){
79
79
  async = true;
80
80
  }
81
81
 
82
- url = url.replace('^/js/', '/js-find/')
82
+ url = url.replace(/^\/js\//, '/js-find/')
83
83
 
84
84
  if ($.inArray(url, required_js) >= 0){
85
85
  if (typeof success == 'function'){ success.call(script) }
@@ -218,7 +218,11 @@ function get_gradient(values, color1, color2){
218
218
  forArray(values, function(value){
219
219
  if (typeof value == 'string') value = parseFloat(value)
220
220
  if (typeof value == 'number'){
221
- var a = (value - min)/diff
221
+ var a
222
+ if (diff != 0)
223
+ a = (value - min)/diff
224
+ else
225
+ a = 1
222
226
  colors.push(color1.blend(color2, a).toString())
223
227
  }else{
224
228
  colors.push(undefined)
@@ -9,10 +9,11 @@ rbbt.plots.aes.map_aesthetic = function(aes, mapper, map_obj){
9
9
  return aes;
10
10
  case 'gradient':
11
11
  if (map_obj){
12
- if (typeof aes == 'object')
12
+ if (typeof aes == 'object'){
13
13
  aes = aes.map(function(value){ return map_obj[value] })
14
- else
14
+ }else{
15
15
  aes = map_obj[aes]
16
+ }
16
17
  }
17
18
  return get_gradient(aes, 'red', 'green')
18
19
  case 'sign-gradient':
@@ -57,7 +57,7 @@ rbbt.plots.graph.update_aes = function(graph_model){
57
57
 
58
58
  )
59
59
  })
60
- return m.sync(data_promises).then(function(){return graph_model})
60
+ return m.sync(data_promises).then(function(){console.log(graph_model); return graph_model})
61
61
  }
62
62
 
63
63
  //{{{ CONSOLIDATION
@@ -7,7 +7,7 @@
7
7
  - y ||= "y"
8
8
 
9
9
  - data_values = []
10
- - data.through do |key,values|
10
+ - data.each do |key,values|
11
11
  - label = key.respond_to?(:name)? key.name || key : key
12
12
  - data_values << {:label => label, :x => values[x], :y => values[y], :size => values[size]}
13
13
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-21 00:00:00.000000000 Z
11
+ date: 2016-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake