Trackster fixes: (a) render bases/colors in Firefox; (b) make deletions black to avoid color conflicts with colored bases; (c) use group name for composite track. Modal fix: set maximum body height so that it does not overflow the bottom of the page. Pack scripts.

This commit is contained in:
Jeremy Goecks
2013-03-20 10:55:24 -04:00
parent feddffdf69
commit e45a787716
6 changed files with 16 additions and 10 deletions
+7
View File
@@ -173,6 +173,13 @@ $.extend( Modal.prototype, {
// Fix min-width so that modal cannot shrink considerably if
// new content is loaded.
this.$body.css( "min-width", this.$body.width() );
// Set max-height so that modal does not exceed window size.
// FIXME: this could perhaps be handled better using a container for the modal
// header-body-footer and setting max-height for the container.
this.$body.css( "max-height",
// 2* to provide buffer between bottom of modal and bottom of page.
$(window).height() - 2 * this.$dialog.offset().top -
this.$footer.outerHeight() - this.$header.outerHeight());
}
// Callback on init
if ( callback ) {
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -845,7 +845,7 @@ extend(ReadPainter.prototype, FeaturePainter.prototype, {
base_offset += cig_len;
break;
case "D": // Deletion.
ctx.fillStyle = "red";
ctx.fillStyle = "black";
ctx.fillRect(s_start, y_center + 4, s_end - s_start, 3);
// TODO: is this true? No change in seq_offset because sequence not used when skipping.
base_offset += cig_len;
+5 -6
View File
@@ -813,11 +813,10 @@ extend(DrawableGroup.prototype, Drawable.prototype, DrawableCollection.prototype
for (var i = 0; i < this.drawables.length; i++) {
drawables_names.push(this.drawables[i].name);
}
var new_track_name = "Composite Track of " + this.drawables.length + " tracks (" + drawables_names.join(", ") + ")";
// Replace this group with composite track.
var composite_track = new CompositeTrack(this.view, this.view, {
name: new_track_name,
name: this.name,
drawables: this.drawables
});
var index = this.container.replace_drawable(this, composite_track, true);
@@ -885,10 +884,10 @@ var TracksterView = Backbone.View.extend({
this.config = new DrawableConfig( {
track: this,
params: [
{ key: 'a_color', label: 'A Color', type: 'color', default_value: "FF0000" },
{ key: 'c_color', label: 'C Color', type: 'color', default_value: "00FF00" },
{ key: 'g_color', label: 'G Color', type: 'color', default_value: "0000FF" },
{ key: 't_color', label: 'T Color', type: 'color', default_value: "FF00FF" }
{ key: 'a_color', label: 'A Color', type: 'color', default_value: "#FF0000" },
{ key: 'c_color', label: 'C Color', type: 'color', default_value: "#00FF00" },
{ key: 'g_color', label: 'G Color', type: 'color', default_value: "#0000FF" },
{ key: 't_color', label: 'T Color', type: 'color', default_value: "#FF00FF" }
],
saved_values: obj_dict.prefs,
onchange: function() {