Skip to content
Browse files

Fix floating starting point bug

  • Loading branch information...
1 parent 5192440 commit 445354aad886d2fac96fc8ff28551845224e11c6 @kneath committed Oct 20, 2008
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/timeframe.js
View
9 src/timeframe.js
@@ -259,6 +259,15 @@ var Timeframe = new Class({
if (date >= this.range.get('begining') || this.range.get('end') == null) this.range.set('end', this.range.get('start'));
this.range.set('start', date);
}
+
+ // Don't know how we get to this state, but sometimes we do. When beginning point is not within start/end point
+ if (this.range.get('start') < this.range.get('begining') && this.range.get('end') < this.range.get('begining')){
+ this.range.set('end', this.range.get('begining'));
+ }
+ if (this.range.get('start') > this.range.get('begining') && this.range.get('end') > this.range.get('begining')){
+ this.range.set('start', this.range.get('begining'));
+ }
+
this.fireEvent('rangeChange');
},

0 comments on commit 445354a

Please sign in to comment.
Something went wrong with that request. Please try again.