| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -32,6 +32,7 @@ exports.convertHiddenOptions = function(body, hiddenDates) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  // allowing multiple input formats
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  var periodicHiddenDates = hiddenDates.periodic; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  if (periodicHiddenDates) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    if (periodicHiddenDates.times) { | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -124,7 +125,10 @@ exports.updateHiddenDates = function (body, hiddenDates) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    // remove duplicates, merge where possible
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    exports.removeDuplicates(body); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    // ensure the new positions are not on hidden dates
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    var startHidden = exports.isHidden(body.range.start, body.hiddenDates); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    var endHidden = exports.isHidden(body.range.end,body.hiddenDates); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    var rangeStart = body.range.start; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -342,19 +346,19 @@ exports.snapAwayFromHidden = function(hiddenTimes, range, start, end, delta, zoo | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      newDates = true; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      // start from left, snap to right
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (range.previousDelta - delta > 0 && zoom == false || zoom == true && range.previousDelta - delta < 0) { // from the left
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        newStart = endDate + 1; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        newStart = endDate + (start - startDate) + 1; // transfer the distance to the other side
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      else { // start from right, snap to left
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        newStart = startDate - 1; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        newStart = startDate - (endDate - start) - 1; // transfer the distance to the other side
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    if (end >= startDate && end < endDate) { // if the end is entering a hidden zone
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      newDates = true; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (range.previousDelta - delta < 0) { //  end from right, snap to left
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        newEnd = startDate - 1; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        newEnd = startDate - (endDate - end) - 1; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      else { // end from left, snap to right
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        newEnd = endDate + 1; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        newEnd = endDate + (end - startDate) + 1; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  } | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
 |