commit/galaxy-central: jgoecks: Trackster: small fixes for calculating tile height.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/36577eb9f7a4/ Changeset: 36577eb9f7a4 User: jgoecks Date: 2013-10-08 17:45:49 Summary: Trackster: small fixes for calculating tile height. Affected #: 1 file diff -r c0f049223e27a3984dab6b018afa1fce440e6288 -r 36577eb9f7a4c48211b1947d8aeb053512f5fccd static/scripts/viz/trackster/tracks.js --- a/static/scripts/viz/trackster/tracks.js +++ b/static/scripts/viz/trackster/tracks.js @@ -2128,9 +2128,9 @@ this.low = region.get('start'); this.high = region.get('end'); this.w_scale = w_scale; - // Wrap element in div for background and explicitly set height. Use canvas - // height attribute because canvas may not have height if it is not in document yet. - this.html_elt = $("<div class='track-tile'/>").append(canvas).height( $(canvas).attr("height") ); + this.canvas = canvas; + // Wrap element in div for background and to provide container for tile-specific elements. + this.html_elt = $("<div class='track-tile'/>").append(canvas); this.data = data; this.stale = false; }; @@ -3371,14 +3371,11 @@ // -- Update track, tile heights based on new tile. -- - // Clear any previous height settings for tile. - tile.html_elt.height('auto'); - - // Update max height based on current tile. - this.max_height_px = Math.max(this.max_height_px, tile.html_elt.height()); + // Update max height based on current tile's canvas. + this.max_height_px = Math.max(this.max_height_px, $(tile.canvas).height()); // Update height for all tiles based on max height. - tile.html_elt.parent().children().css("height", this.max_height_px + "px"); + tile_element.parent().children().css("height", this.max_height_px + "px"); // Update track height based on max height and visible height. var track_height = this.max_height_px; 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