commit/galaxy-central: james_taylor: trackster: for line painter, determine min and max from data if not provided (not actually used for trackster)
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/91d49371fd1e/ changeset: r5432:91d49371fd1e user: james_taylor date: 2011-04-19 15:44:28 summary: trackster: for line painter, determine min and max from data if not provided (not actually used for trackster) affected #: 1 file (537 bytes) --- a/static/scripts/trackster.js Tue Apr 19 08:24:57 2011 -0400 +++ b/static/scripts/trackster.js Tue Apr 19 09:44:28 2011 -0400 @@ -2864,6 +2864,20 @@ var LinePainter = function( data, view_start, view_end, prefs, mode ) { Painter.call( this, data, view_start, view_end, prefs, mode ); + if ( this.prefs.min_value === undefined ) { + var min_value = Infinity; + for (var i = 0, len = this.data.length; i < len; i++) { + min_value = Math.min( min_value, this.data[i][1] ); + } + this.prefs.min_value = min_value; + } + if ( this.prefs.max_value === undefined ) { + var max_value = -Infinity; + for (var i = 0, len = this.data.length; i < len; i++) { + max_value = Math.max( max_value, this.data[i][1] ); + } + this.prefs.max_value = max_value; + } }; LinePainter.prototype.default_prefs = { min_value: undefined, max_value: undefined, mode: "Histogram", color: "#000", overflow_color: "#F66" }; 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