From 304d02a461c2b011e13dcc5dd118a36ffdc5c811 Mon Sep 17 00:00:00 2001 From: Marvin Date: Tue, 21 Aug 2018 19:02:52 +0200 Subject: [PATCH] Use accessors when determining dnd height. --- src/addons/dragAndDrop/EventContainerWrapper.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/addons/dragAndDrop/EventContainerWrapper.js b/src/addons/dragAndDrop/EventContainerWrapper.js index e5f2bde28..e0d0afdcd 100644 --- a/src/addons/dragAndDrop/EventContainerWrapper.js +++ b/src/addons/dragAndDrop/EventContainerWrapper.js @@ -73,7 +73,7 @@ class EventContainerWrapper extends React.Component { handleMove = (point, boundaryBox) => { const { event } = this.context.draggable.dragAndDropAction - const { slotMetrics } = this.props + const { accessors, slotMetrics } = this.props if (!pointInColumn(boundaryBox, point)) { this.reset() @@ -85,9 +85,11 @@ class EventContainerWrapper extends React.Component { boundaryBox ) + let eventStart = accessors.start(event) + let eventEnd = accessors.end(event) let end = dates.add( currentSlot, - dates.diff(event.start, event.end, 'minutes'), + dates.diff(eventStart, eventEnd, 'minutes'), 'minutes' )