commit/galaxy-central: jgoecks: Trackster: fixes for calculating variant track height.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/26d65c928963/ Changeset: 26d65c928963 User: jgoecks Date: 2013-04-19 17:53:00 Summary: Trackster: fixes for calculating variant track height. Affected #: 2 files diff -r 49305f493a907e8fbb58c2a9c57c3e3565ed9ee8 -r 26d65c9289631a10b6f5913cd74a74112ea21dff static/scripts/viz/trackster/painters.js --- a/static/scripts/viz/trackster/painters.js +++ b/static/scripts/viz/trackster/painters.js @@ -1571,21 +1571,13 @@ return height; }, - get_required_height: function(rows_required, width) { + /** + * Returns required height to draw a particular number of samples in a given mode. + */ + get_required_height: function(num_samples) { var height = this.prefs.summary_height; if (this.prefs.show_sample_data) { - height += this.divider_height; - if (this.data.length !== 0) { - // Sample data is separated by commas, so this computes # of samples: - var comma_match = this.data[0][7].match(/,/g); - if ( comma_match === null ) { - comma_match = 1; - } - else { - comma_match = comma_match.length + 1; - } - height += ( comma_match * this.get_row_height() ); - } + height += this.divider_height + num_samples * this.get_row_height(); } return height; }, diff -r 49305f493a907e8fbb58c2a9c57c3e3565ed9ee8 -r 26d65c9289631a10b6f5913cd74a74112ea21dff static/scripts/viz/trackster/tracks.js --- a/static/scripts/viz/trackster/tracks.js +++ b/static/scripts/viz/trackster/tracks.js @@ -4226,8 +4226,8 @@ return this.summary_draw_height; } else { - var dummy_painter = new (this.painter)(result.data, null, null, this.prefs, mode); - return dummy_painter.get_required_height(); + var dummy_painter = new (this.painter)(null, null, null, this.prefs, mode); + return dummy_painter.get_required_height(this.dataset.get_metadata('sample_names').length); } }, 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)
-
commits-noreply@bitbucket.org