mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Use default load function for chart plugins
This commit is contained in:
@@ -17,7 +17,7 @@ export default Backbone.View.extend({
|
||||
this.chart = new Chart({}, options);
|
||||
this.chart.plugin = options.visualization_plugin;
|
||||
this.chart.plugin.specs = this.chart.plugin.specs || {};
|
||||
this.chart_func = options.chart_func;
|
||||
this.chart_load = options.chart_load;
|
||||
this.deferred = new Deferred();
|
||||
this.viewer = new Viewer(this);
|
||||
this.editor = new Editor(this);
|
||||
|
||||
@@ -95,6 +95,6 @@ export default Backbone.View.extend({
|
||||
var n_panels = chart.settings.get("__use_panels") == "true" ? chart.groups.length : 1;
|
||||
this._createContainer(chart.plugin.specs.tag, n_panels);
|
||||
chart.state("wait", "Please wait...");
|
||||
this.app.chart_func({ process: process, chart: chart, dataset: this.app.dataset, targets: this.targets });
|
||||
this.app.chart_load({ process: process, chart: chart, dataset: this.app.dataset, targets: this.targets });
|
||||
}
|
||||
});
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var config = ${h.dumps(config)};
|
||||
var func = "${script_attributes.get("func")}";
|
||||
if (!bundleEntries[func]) {
|
||||
alert("Entry function '" + func + "' not found.");
|
||||
var load = "${script_attributes.get("load")}";
|
||||
if (!bundleEntries[load]) {
|
||||
alert("Load function '" + load + "' not found.");
|
||||
}
|
||||
var app = bundleEntries.chart({
|
||||
visualization_id: ${h.dumps(visualization_id)} || undefined,
|
||||
@@ -36,7 +36,7 @@
|
||||
visualization_plugin: ${h.dumps(visualization_plugin)},
|
||||
dataset_id: config.dataset_id,
|
||||
chart_dict: config.chart_dict,
|
||||
chart_func: bundleEntries[func]
|
||||
chart_load: bundleEntries[load]
|
||||
});
|
||||
$('body').append(app.$el);
|
||||
});
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<params>
|
||||
<param type="dataset" var_name_in_template="hda" required="true">dataset_id</param>
|
||||
</params>
|
||||
<entry_point entry_point_type="chart" src="static/script.js" func="func"/>
|
||||
<entry_point entry_point_type="chart" src="static/script.js"/>
|
||||
<settings>
|
||||
<input>
|
||||
<label>Curve style</label>
|
||||
|
||||
@@ -157,7 +157,7 @@ function run_traversal_type( cytoscape, root_id, type ) {
|
||||
};
|
||||
|
||||
_.extend(window.bundleEntries || {}, {
|
||||
func: function(options) {
|
||||
load: function(options) {
|
||||
var self = this,
|
||||
chart = options.chart,
|
||||
dataset = options.dataset,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import DrawRNA from "./drawrnajs/drawrna";
|
||||
_.extend(window.bundleEntries || {}, {
|
||||
func: function(options) {
|
||||
load: function(options) {
|
||||
var chart = options.chart;
|
||||
var dataset = options.dataset;
|
||||
$.ajax({
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user