rbbt-rest 1.8.47 → 1.8.48

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: 9194e343c60191741360a2a664c79d5ae8b57afd
4
- data.tar.gz: a8cb16d87452d75c3b336c38ab0c03763fcb9c95
3
+ metadata.gz: 135792dc2caf7288c96e3b01d7c046d5d622bf01
4
+ data.tar.gz: 96bf1404866d5b384910f5bdcda226202587f964
5
5
  SHA512:
6
- metadata.gz: 29e5b7f56aae683bd10d6456ffa16995a20e283f78278acb888f0bd5246a79f3d25c8f55f8a23b6d10ce5da654b88404147d0b9d3d9f39c6cc6fc2bf8be3bd28
7
- data.tar.gz: 758207cbd5a1b8ea41c5dfbab3a117a40f7312cf286af44ba3741a50f42e9bf62cd2e103cce45759f9a790b90c770dd2b998f320ba909359cd4b300d4ce6adee
6
+ metadata.gz: 82daaae736361ca7de6c43ee00ee2c110297ff19b94939ecda4e80427eb12e90302d4d75ccb8875e36557bb7671d1524966ba4e5872a0d76b7e6140fd65dd355
7
+ data.tar.gz: 85d2d75d60a48d4cdb7fe298f267dc5888f41d5aba50204349217ac2cc3ea49eddbd9239609d1683390e3bf6959f71f4f7447574496ddc2168105cad4cb1cba9
@@ -50,7 +50,7 @@
50
50
 
51
51
  -# VISUALIZATION JS
52
52
  - record_js '/plugins/color-js/color.js'
53
- - record_js '/plugins/d3js/js/d3js.min.js'
53
+ - record_js '/plugins/d3js/js/d3.v3.min.js'
54
54
  - record_js '/plugins/nvd3/js/nv.d3.js'
55
55
  - record_js '/plugins/svg-pan-zoom/js/svg-pan-zoom.js'
56
56
  - record_js '/plugins/cola/js/cola.js'
@@ -94,6 +94,13 @@ rbbt.plots.aes.get_properties = function(list, rules, type, namespace){
94
94
  }
95
95
  }
96
96
 
97
+ if (rule.subset){
98
+ var deferred = m.deferred()
99
+ var inclusion = list.codes.map(function(code){ if (rule.subset.indexOf(code) < 0){ return "false"} else { return "true" } })
100
+ deferred.resolve(inclusion)
101
+ promise = deferred.promise
102
+ }
103
+
97
104
  if (rule.value){
98
105
  var property = rule.property
99
106
  var deferred = m.deferred()
@@ -138,6 +138,12 @@ rbbt.plots.graph.view_cytoscape = function(graph_model, elem, style, layout, ext
138
138
  var dataset = rbbt.plots.graph.build_cytoscape(updated_model)
139
139
 
140
140
  require_js(['/js/cytoscape/js/src/AC_OETags.js', '/js/cytoscape/js/src/cytoscapeweb.js', '/js/cytoscape'], function(){
141
+ var win = elem.find('.window')
142
+ if (win.length == 0){
143
+ win = $('<div>').addClass('window').css('height', '500px')
144
+ elem.append(win)
145
+ }
146
+ if (undefined === win.attr('id')) win.attr('id', 'cytoscape_' + Math.ceil(Math.random() * 100000))
141
147
  var tool = $(elem).cytoscape_tool({
142
148
  knowledge_base: 'user',
143
149
  namespace: 'Hsa/feb2014',
@@ -196,6 +202,17 @@ rbbt.plots.graph.view_cytoscape = function(graph_model, elem, style, layout, ext
196
202
  })
197
203
  }
198
204
 
205
+ rbbt.plots.graph.update_cytoscape = function(graph_model, elem){
206
+ rbbt.plots.graph.update(graph_model).then(function(updated_model){
207
+ var dataset = rbbt.plots.graph.build_cytoscape(updated_model)
208
+ $(elem).cytoscape_tool({
209
+ entities: dataset.nodes,
210
+ network: dataset
211
+ })
212
+ $(elem).cytoscape_tool('update_network')
213
+ })
214
+ }
215
+
199
216
  rbbt.plots.graph.view_d3js_graph = function(graph_model, elem, node_obj){
200
217
  rbbt.plots.graph.update(graph_model).then(function(updated_model){
201
218
  console.log(updated_model)