From 4d3157443fd1e89e9dfa77e5b25cd3011d2cd772 Mon Sep 17 00:00:00 2001 From: yotamberk Date: Wed, 4 Jan 2017 21:46:58 +0200 Subject: [PATCH] Fix small bug when subgroups start overlap without subgroupStack (#2527) * Fix redraw order * Fix error when option is not defined * Allow template labels * Fix boolean types bug * Add subgroup stacking * Almost finish subgroup stacking * Play with examples for subgroup order * Fix stacked subgroups * Fix subgroup stacking * Add stackSubgroups option * Fix example * Add docs * Fix onRemove item subgroups recalculate * Return subgroup example and add stackSubgroup example * Split stackSubgroup example to subgroup/html and expectedVsActualTimesItems.html * Fix small bug when subgroups start overlap --- lib/timeline/Stack.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/timeline/Stack.js b/lib/timeline/Stack.js index ab921893..1893c07e 100644 --- a/lib/timeline/Stack.js +++ b/lib/timeline/Stack.js @@ -177,7 +177,7 @@ exports.collision = function(a, b, margin, rtl) { */ exports.collisionByTimes = function(a, b) { return ( - (a.start < b.start && a.end > b.start && a.top < (b.top + b.height) && (a.top + a.height) > b.top ) || - (b.start < a.start && b.end > a.start && b.top < (a.top + a.height) && (b.top + b.height) > a.top ) + (a.start <= b.start && a.end >= b.start && a.top < (b.top + b.height) && (a.top + a.height) > b.top ) || + (b.start <= a.start && b.end >= a.start && b.top < (a.top + a.height) && (b.top + b.height) > a.top ) ) } \ No newline at end of file