commit/galaxy-central: jgoecks: (a) JSLint cleanup for phyloviz.js and (b) make phyloviz, scatterplot available.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/89c27f6b20f8/ changeset: 89c27f6b20f8 user: jgoecks date: 2012-10-04 17:07:29 summary: (a) JSLint cleanup for phyloviz.js and (b) make phyloviz, scatterplot available. affected #: 2 files diff -r d7eba083859770e676f173b75f2053f575305113 -r 89c27f6b20f8f261a8e45e33abcc2ed9c1509a71 static/scripts/viz/phyloviz.js --- a/static/scripts/viz/phyloviz.js +++ b/static/scripts/viz/phyloviz.js @@ -233,12 +233,16 @@ // removing unnecessary attributes if (node._selected){ delete node._selected;} - node.children ? node.children.forEach(cleanTree) : 0; - node._children ? node._children.forEach(cleanTree) : 0; + if (node.children) { + node.children.forEach(cleanTree); + } + if (node._children) { + node._children.forEach(cleanTree); + } } var config = jQuery.extend(true, {}, this.attributes); - config["selectedNode"] = null; + config.selectedNode = null; show_message("Saving to Galaxy", "progress"); @@ -598,9 +602,11 @@ * Function to zoom and pan the svg element which the entire tree is contained within * Uses d3.zoom events, and extend them to allow manual updates and keeping states in model */ + var zoomParams, + translateParams; if (typeof event !== "undefined") { - var zoomParams = event.zoom, - translateParams = event.translate; + zoomParams = event.zoom; + translateParams = event.translate; } var self = this, @@ -761,9 +767,9 @@ * Applying user values to phylotree model. */ var self = this; - if (!self.isAcceptableValue(self.inputs["separation"], 50, 2500) || - !self.isAcceptableValue(self.inputs["leafHeight"], 5, 30) || - !self.isAcceptableValue(self.inputs["fontSize"], 5, 20)){ + if (!self.isAcceptableValue(self.inputs.separation, 50, 2500) || + !self.isAcceptableValue(self.inputs.leafHeight, 5, 30) || + !self.isAcceptableValue(self.inputs.fontSize, 5, 20)){ return; } $.each(self.inputs, function(key, $input){ @@ -854,7 +860,7 @@ var self = this, checked = self.UI.enableEdit.is(':checked'); - !checked ? self.cancelChanges() : ""; + if (!checked) { self.cancelChanges(); } $.each(self.valuesOfConcern, function(key, value) { self.UI[key].enable(checked); diff -r d7eba083859770e676f173b75f2053f575305113 -r 89c27f6b20f8f261a8e45e33abcc2ed9c1509a71 templates/root/history_common.mako --- a/templates/root/history_common.mako +++ b/templates/root/history_common.mako @@ -227,10 +227,10 @@ ## information--URL base, dataset id, dbkey, visualizations--in anchor. <% visualizations = data.get_visualizations() - ## HACK: if there are visualizations, only provide trackster for now + ## HACK: if there are visualizations, only provide a subset for now ## since others are not ready. - comment out to see all WIP visualizations - #if visualizations: - # visualizations = [ vis for vis in visualizations if vis in [ 'trackster' ] ] + if visualizations: + visualizations = [ vis for vis in visualizations if vis in [ 'trackster', 'phyloviz', 'scatterplot' ] ] %> %if visualizations: <a href="${h.url_for( controller='visualization' )}" Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket