mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Cleanup redrawing triggering, remove unused message handlers
This commit is contained in:
@@ -93,24 +93,13 @@ export default Backbone.View.extend({
|
||||
self.chart.groups.add({ id: Utils.uid() });
|
||||
}
|
||||
});
|
||||
this.message = new Ui.Message({
|
||||
message: "There are no data selection options for this visualization type.",
|
||||
persistent: true,
|
||||
status: "info"
|
||||
});
|
||||
this.setElement(
|
||||
$("<div/>")
|
||||
.append(this.repeat.$el.addClass("ui-margin-bottom"))
|
||||
.append(this.message.$el.addClass("ui-margin-bottom"))
|
||||
.append(this.repeat.$el)
|
||||
);
|
||||
this.listenTo(this.chart, "change", function() {
|
||||
self.render();
|
||||
});
|
||||
this.listenTo(this.chart.groups, "remove reset", function() {
|
||||
self.chart.trigger("redraw")
|
||||
});
|
||||
this.listenTo(this.chart.groups, "remove", function(group) {
|
||||
self.repeat.del(group.id);
|
||||
self.chart.trigger("redraw");
|
||||
});
|
||||
this.listenTo(this.chart.groups, "reset", function() {
|
||||
self.repeat.delAll();
|
||||
@@ -129,10 +118,8 @@ export default Backbone.View.extend({
|
||||
render: function() {
|
||||
if (_.size(this.chart.plugin.groups) > 0) {
|
||||
this.repeat.$el.show();
|
||||
this.message.$el.hide();
|
||||
} else {
|
||||
this.repeat.$el.hide();
|
||||
this.message.$el.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -27,6 +27,7 @@ export default Backbone.View.extend({
|
||||
this._createContainer("div");
|
||||
this.chart.on("redraw", function() {
|
||||
self.app.deferred.execute(function(process) {
|
||||
console.debug("viewer:redraw() - Redrawing...");
|
||||
self._draw(process, self.chart);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user