trackster: natural sort for chroms list, disable zooming when no data, can click on labels when selecting datasets

This commit is contained in:
Kanwei Li
2009-09-23 17:32:16 -04:00
parent 7aff80912e
commit 9d7a14f765
3 changed files with 20 additions and 7 deletions
+4
View File
@@ -67,6 +67,9 @@ $.extend( View.prototype, {
this.high = Math.min( this.length, Math.ceil( new_high ) );
},
zoom_in: function ( factor, point ) {
console.log(this.max_high);
if (this.max_high == 0) return;
var range = this.high - this.low;
var diff = range / factor / 2;
@@ -92,6 +95,7 @@ $.extend( View.prototype, {
}
},
zoom_out: function ( factor ) {
if (this.max_high == 0) return;
var center = ( this.low + this.high ) / 2;
var range = this.high - this.low;
var diff = range * factor / 2;