Forráskód Böngészése

bugfixes related to refactor

Adam Shaw 11 éve
szülő
commit
62f6c03a52
2 módosított fájl, 8 hozzáadás és 4 törlés
  1. 7 3
      src/common/DayGrid.js
  2. 1 1
      src/common/View.js

+ 7 - 3
src/common/DayGrid.js

@@ -248,15 +248,19 @@ var DayGrid = Grid.extend({
 			segFirst = Math.max(rowFirst, first);
 			segLast = Math.min(rowLast, last);
 
+			// deal with in-between indices
+			segFirst = Math.ceil(segFirst); // in-between starts round to next cell
+			segLast = Math.floor(segLast); // in-between ends round to prev cell
+
 			if (segFirst <= segLast) { // was there any intersection with the current row?
 
 				// must be matching integers to be the segment's start/end
 				isStart = segFirst === first;
 				isEnd = segLast === last;
 
-				// deal with in-between indices, and translate offsets to be relative to start-of-row
-				segFirst = Math.ceil(segFirst) - rowFirst; // in-between starts round to next cell
-				segLast = Math.floor(segLast) - rowFirst; // in-between ends round to prev cell
+				// translate offsets to be relative to start-of-row
+				segFirst -= rowFirst;
+				segLast -= rowFirst;
 
 				seg = { row: row, isStart: isStart, isEnd: isEnd };
 				if (isRTL) {

+ 1 - 1
src/common/View.js

@@ -40,7 +40,7 @@ var View = fc.View = Class.extend({
 	isHiddenDayHash: null,
 
 	// document handlers, bound to `this` object
-	documentMousedownProxy: null,
+	documentMousedownProxy: null, // TODO: doesn't work with touch
 
 
 	constructor: function(calendar, viewOptions, viewType) {