Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating Cytoscape viewer in Viz/Charts, replacing the previous 'basi…
…c' folder name to 'viewer' and updating the wrapper.js file
- Loading branch information
Showing
13 changed files
with
1,721 additions
and
99 deletions.
There are no files selected for viewing
37 changes: 0 additions & 37 deletions
37
config/plugins/visualizations/charts/static/repository/build/cytoscape_basic.js
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
config/plugins/visualizations/charts/static/repository/build/cytoscape_basic.js.map
This file was deleted.
Oops, something went wrong.
563 changes: 563 additions & 0 deletions
563
config/plugins/visualizations/charts/static/repository/build/cytoscape_viewer.js
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
config/plugins/visualizations/charts/static/repository/build/cytoscape_viewer.js.map
Large diffs are not rendered by default.
Oops, something went wrong.
1,106 changes: 1,105 additions & 1 deletion
1,106
config/plugins/visualizations/charts/static/repository/build/registry.js
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
config/plugins/visualizations/charts/static/repository/build/registry.js.map
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
config/plugins/visualizations/charts/static/repository/build/registry.tmp.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 0 additions & 56 deletions
56
...plugins/visualizations/charts/static/repository/visualizations/cytoscape/basic/wrapper.js
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes
48 changes: 48 additions & 0 deletions
48
...lugins/visualizations/charts/static/repository/visualizations/cytoscape/viewer/wrapper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} | ||
}); | ||
} | ||
}); | ||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.