Skip to content

Commit

Permalink
Updating Cytoscape viewer in Viz/Charts, replacing the previous 'basi…
Browse files Browse the repository at this point in the history
…c' folder name to 'viewer' and updating the wrapper.js file
  • Loading branch information
anuprulez committed Feb 23, 2017
1 parent 73c444e commit b18736d
Show file tree
Hide file tree
Showing 13 changed files with 1,721 additions and 99 deletions.

This file was deleted.

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,106 changes: 1,105 additions & 1 deletion config/plugins/visualizations/charts/static/repository/build/registry.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -3,7 +3,7 @@
"jqplot" : [ "bar", "boxplot", "histogram_discrete", "line", "scatter" ],
"biojs" : [ "msa", "drawrnajs" ],
"others" : [ "example", "heatmap", "heatmap_cluster" ],
"cytoscape" : [ "basic" ],
"cytoscape" : [ "viewer" ],
"pv" : [ "viewer" ],
"benfred" : [ "venn" ],
"ngl" : [ "viewer" ]
Expand Down

This file was deleted.

@@ -0,0 +1,48 @@
define( [ 'utilities/utils', 'plugins/cytoscape/cytoscape' ], function( Utils, Cytoscape ) {
return Backbone.Model.extend({
initialize: function( options ) {
var chart = options.chart;
var dataset = options.dataset;
Utils.get( {
url : dataset.download_url,
success : function( content ) {
try {
Cytoscape({
container: document.getElementById( options.targets[ 0 ] ),
boxSelectionEnabled: false,
autounselectify: true,
layout: {
name: 'grid'
},
style: [{
selector: 'node',
style: {
'background-color': '#18e018'
}
},
{
selector: 'edge',
style: {
'curve-style': 'haystack',
'haystack-radius': 0,
'width': 5,
'opacity': 0.5,
'line-color': '#ad1a66'
}
}],
elements: content
});
chart.state( 'ok', 'Chart drawn.' );
} catch( err ) {
chart.state( 'failed', err );
}
options.process.resolve();
},
error: function() {
chart.state( 'failed', 'Failed to access dataset.' );
options.process.resolve();
}
});
}
});
});
2 changes: 1 addition & 1 deletion static/scripts/bundled/libs.bundled.js.map

Large diffs are not rendered by default.

0 comments on commit b18736d

Please sign in to comment.