My favorites
▼
|
Sign in
fullcalendar
ISSUE TRACKER HAS MOVED. DO NOT USE THIS (more info)
Project Home
Issues
Export to GitHub
New issue
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
765
attachment: fullcalendar-765-1.patch
(1.8 KB)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
diff --git src/agenda/AgendaEventRenderer.js src/agenda/AgendaEventRenderer.js
index cdd90f9..223c847 100644
--- src/agenda/AgendaEventRenderer.js
+++ src/agenda/AgendaEventRenderer.js
@@ -325,10 +325,12 @@ function AgendaEventRenderer() {
function draggableDayEvent(event, eventElement, isStart) {
if (!opt('disableDragging') && eventElement.draggable) {
var origWidth;
+ var origPosition;
var allDay=true;
var dayDelta;
var dis = opt('isRTL') ? -1 : 1;
var hoverListener = getHoverListener();
+ var colCnt = getColCnt();
var colWidth = getColWidth();
var slotHeight = getSlotHeight();
var minMinute = getMinMinute();
@@ -340,6 +342,7 @@ function AgendaEventRenderer() {
trigger('eventDragStart', eventElement, event, ev, ui);
hideEvents(event, eventElement);
origWidth = eventElement.width();
+ origPosition = eventElement.position();
hoverListener.start(function(cell, origCell, rowDelta, colDelta) {
eventElement.draggable('option', 'revert', !cell || !rowDelta && !colDelta);
clearOverlays();
@@ -370,6 +373,10 @@ function AgendaEventRenderer() {
}
}, ev, 'drag');
},
+ drag: function(ev, ui) {
+ var position = Math.min(Math.max(colWidth, ui.position.left), colWidth * colCnt);
+ dayDelta = Math.round((position - origPosition.left) / colWidth);
+ },
stop: function(ev, ui) {
var cell = hoverListener.stop();
clearOverlays();
@@ -469,6 +476,8 @@ function AgendaEventRenderer() {
}
prevMinuteDelta = minuteDelta;
}
+ var position = Math.min(Math.max(colWidth, ui.position.left), colWidth * colCnt);
+ dayDelta = Math.round((position - origPosition.left) / colWidth);
},
stop: function(ev, ui) {
var cell = hoverListener.stop();
Powered by
Google Project Hosting