commit/galaxy-central: jgoecks: Bug fix and code cleanup for recent visualization commits.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/7663ed1ce177/ changeset: 7663ed1ce177 user: jgoecks date: 2012-09-13 15:30:42 summary: Bug fix and code cleanup for recent visualization commits. affected #: 2 files diff -r eb55dd8768cefb1548b2ced2e44a7df4fe8dde5e -r 7663ed1ce1779b78f5f39037def1c4610b96ce56 static/scripts/viz/circster.js --- a/static/scripts/viz/circster.js +++ b/static/scripts/viz/circster.js @@ -1,7 +1,7 @@ define( ["libs/d3", "viz/visualization"], function( d3, visualization ) { // General backbone style inheritence -var Base = function() { this.initialize && this.initialize.apply(this, arguments) }; Base.extend = Backbone.Model.extend; +var Base = function() { this.initialize && this.initialize.apply(this, arguments); }; Base.extend = Backbone.Model.extend; /** * Renders a full circster visualization @@ -23,8 +23,8 @@ height = self.$el.height(), // Compute radius start based on model, will be centered // and fit entirely inside element by default - init_radius_start = ( Math.min(width,height)/2 - - this.model.get('tracks').length * (this.dataset_arc_height + this.track_gap) ); + init_radius_start = ( Math.min(width,height)/2 - + this.model.get('tracks').length * (this.dataset_arc_height + this.track_gap) ); // Set up SVG element. var svg = d3.select(self.$el[0]) @@ -36,11 +36,11 @@ .append('svg:g') .call(d3.behavior.zoom().on('zoom', function() { svg.attr("transform", - "translate(" + d3.event.translate + ")" - + " scale(" + d3.event.scale + ")"); + "translate(" + d3.event.translate + ")" + + " scale(" + d3.event.scale + ")"); })) .attr("transform", "translate(" + width / 2 + "," + height / 2 + ")") - .append('svg:g') + .append('svg:g'); // -- Render each dataset in the visualization. -- @@ -49,7 +49,7 @@ radius_start = init_radius_start + index * (dataset_arc_height + self.track_gap), track_renderer_class = (dataset instanceof visualization.GenomeWideBigWigData ? CircsterBigWigTrackRenderer : CircsterSummaryTreeTrackRenderer ); - track_renderer = new track_renderer_class({ + var track_renderer = new track_renderer_class({ track: track, radius_start: radius_start, radius_end: radius_start + dataset_arc_height, @@ -71,8 +71,8 @@ render: function( svg ) { - genome_arcs = this.chroms_layout(), - chroms_arcs = this.genome_data_layout(); + var genome_arcs = this.chroms_layout(), + chroms_arcs = this.genome_data_layout(); // -- Render. -- @@ -106,7 +106,7 @@ //.style("stroke", block_color) //.style("fill", block_color) - dataset_elts.append("path").attr("d", arc_gen).style("stroke", block_color) + dataset_elts.append("path").attr("d", arc_gen).style("stroke", block_color); }); }, @@ -160,7 +160,7 @@ /** * Layout for summary tree data in a circster visualization. */ -var CircsterSummaryTrackRenderer = CircsterTrackRenderer.extend({ +var CircsterSummaryTreeTrackRenderer = CircsterTrackRenderer.extend({ /** * Returns layouts for drawing a chromosome's data. @@ -230,6 +230,6 @@ return { CircsterView: CircsterView -} +}; }); diff -r eb55dd8768cefb1548b2ced2e44a7df4fe8dde5e -r 7663ed1ce1779b78f5f39037def1c4610b96ce56 static/scripts/viz/visualization.js --- a/static/scripts/viz/visualization.js +++ b/static/scripts/viz/visualization.js @@ -783,31 +783,31 @@ return module.exports; } else if ( typeof define === 'function' && define.amd ) { // AMD - exports = {} - define( function() { return exports } ); - return exports + exports = {}; + define( function() { return exports; } ); + return exports; } else { // Browser global return window; } })(); -exports.BrowserBookmark = BrowserBookmark -exports.BrowserBookmarkCollection = BrowserBookmarkCollection -exports.Cache = Cache -exports.CanvasManager = CanvasManager -exports.Genome = Genome -exports.GenomeDataManager = GenomeDataManager -exports.GenomeRegion = GenomeRegion -exports.GenomeRegionCollection = GenomeRegionCollection -exports.GenomeVisualization = GenomeVisualization -exports.GenomeWideBigWigData = GenomeWideBigWigData -exports.GenomeWideSummaryTreeData = GenomeWideSummaryTreeData -exports.ReferenceTrackDataManager = ReferenceTrackDataManager -exports.ServerStateDeferred = ServerStateDeferred -exports.TrackBrowserRouter = TrackBrowserRouter -exports.TrackConfig = TrackConfig -exports.Visualization = Visualization -exports.add_datasets = add_datasets +exports.BrowserBookmark = BrowserBookmark; +exports.BrowserBookmarkCollection = BrowserBookmarkCollection; +exports.Cache = Cache; +exports.CanvasManager = CanvasManager; +exports.Genome = Genome; +exports.GenomeDataManager = GenomeDataManager; +exports.GenomeRegion = GenomeRegion; +exports.GenomeRegionCollection = GenomeRegionCollection; +exports.GenomeVisualization = GenomeVisualization; +exports.GenomeWideBigWigData = GenomeWideBigWigData; +exports.GenomeWideSummaryTreeData = GenomeWideSummaryTreeData; +exports.ReferenceTrackDataManager = ReferenceTrackDataManager; +exports.ServerStateDeferred = ServerStateDeferred; +exports.TrackBrowserRouter = TrackBrowserRouter; +exports.TrackConfig = TrackConfig; +exports.Visualization = Visualization; +exports.add_datasets = add_datasets; }).call(this); \ No newline at end of file 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