From: Jan Schneider Date: Mon, 15 Mar 2010 16:57:48 +0000 (+0100) Subject: Improve "feel" of dragging horizontally in week view. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e28a1680406e803179f8cc7f6722335f7885e5a3;p=horde.git Improve "feel" of dragging horizontally in week view. --- diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index e2c032417..51e228627 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -1500,9 +1500,11 @@ KronolithCore = { nodrop: true, parentElement: function() { return $(view == 'day' ? 'kronolithEventsDay' : 'kronolithEventsWeek' + date); }, snap: function(x, y) { +console.log(x); x = (view == 'week') - ? Math.max(minLeft, stepX * ((Math.min(maxLeft, x) + stepX / 2) / stepX | 0)) + ? Math.max(minLeft, stepX * ((Math.min(maxLeft, x - (x < 0 ? stepX : 0)) + stepX / 2) / stepX | 0)) : 0; +console.log(x); y = Math.max(0, step * (Math.min(maxDiv, y) / step | 0)); return [x, y]; }