|
|
@@ -127,14 +127,6 @@ var Grid = FC.Grid = ChronoComponent.extend({
|
|
|
},
|
|
|
|
|
|
|
|
|
- isFootprintInRange: function(componentFootprint) { // used by other things too
|
|
|
- return isRangeWithinRange(
|
|
|
- componentFootprint.dateRange.getRange(),
|
|
|
- this.view.validRange
|
|
|
- );
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
// Diffs the two dates, returning a duration, based on granularity of the grid
|
|
|
// TODO: port isTimeScale into this system?
|
|
|
diffDates: function(a, b) {
|
|
|
@@ -186,7 +178,12 @@ var Grid = FC.Grid = ChronoComponent.extend({
|
|
|
getSafeHitFootprint: function(hit) {
|
|
|
var footprint = this.getHitFootprint(hit);
|
|
|
|
|
|
- if (!this.isFootprintInRange(footprint)) {
|
|
|
+ if (
|
|
|
+ !isRangeWithinRange(
|
|
|
+ footprint.dateRange.getRange(),
|
|
|
+ this.view.activeRange
|
|
|
+ )
|
|
|
+ ) {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
@@ -544,8 +541,11 @@ var Grid = FC.Grid = ChronoComponent.extend({
|
|
|
|
|
|
|
|
|
isSelectionFootprintAllowed: function(componentFootprint) {
|
|
|
- return this.isFootprintInRange(componentFootprint) &&
|
|
|
- this.view.calendar.isSelectionFootprintAllowed(componentFootprint);
|
|
|
+ return isRangeWithinRange(
|
|
|
+ componentFootprint.dateRange.getRange(),
|
|
|
+ this.view.validRange
|
|
|
+ ) &&
|
|
|
+ this.view.calendar.isSelectionFootprintAllowed(componentFootprint);
|
|
|
},
|
|
|
|
|
|
|