|
@@ -144,12 +144,14 @@ var Grid = FC.Grid = ChronoComponent.extend({
|
|
|
|
|
|
|
|
hitsNeededDepth: 0, // necessary because multiple callers might need the same hits
|
|
hitsNeededDepth: 0, // necessary because multiple callers might need the same hits
|
|
|
|
|
|
|
|
|
|
+
|
|
|
hitsNeeded: function() {
|
|
hitsNeeded: function() {
|
|
|
if (!(this.hitsNeededDepth++)) {
|
|
if (!(this.hitsNeededDepth++)) {
|
|
|
this.prepareHits();
|
|
this.prepareHits();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+
|
|
|
hitsNotNeeded: function() {
|
|
hitsNotNeeded: function() {
|
|
|
if (this.hitsNeededDepth && !(--this.hitsNeededDepth)) {
|
|
if (this.hitsNeededDepth && !(--this.hitsNeededDepth)) {
|
|
|
this.releaseHits();
|
|
this.releaseHits();
|
|
@@ -157,24 +159,6 @@ var Grid = FC.Grid = ChronoComponent.extend({
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
- // Called before one or more queryHit calls might happen. Should prepare any cached coordinates for queryHit
|
|
|
|
|
- prepareHits: function() {
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- // Called when queryHit calls have subsided. Good place to clear any coordinate caches.
|
|
|
|
|
- releaseHits: function() {
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- // Given coordinates from the topleft of the document, return data about the date-related area underneath.
|
|
|
|
|
- // Can return an object with arbitrary properties (although top/right/left/bottom are encouraged).
|
|
|
|
|
- // Must have a `grid` property, a reference to this current grid. TODO: avoid this
|
|
|
|
|
- // The returned object will be processed by getHitFootprint and getHitEl.
|
|
|
|
|
- queryHit: function(leftOffset, topOffset) {
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
getSafeHitFootprint: function(hit) {
|
|
getSafeHitFootprint: function(hit) {
|
|
|
var footprint = this.getHitFootprint(hit);
|
|
var footprint = this.getHitFootprint(hit);
|
|
|
|
|
|