Skip to content

Commit

Permalink
fix: use accessors when determining dnd height. (jquense#954)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amazing Marvin authored and jquense committed Sep 21, 2018
1 parent b761e86 commit be81065
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/addons/dragAndDrop/EventContainerWrapper.js
Expand Up @@ -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()
Expand All @@ -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'
)

Expand Down

0 comments on commit be81065

Please sign in to comment.