Skip to content

Commit

Permalink
Use accessors when determining dnd height.
Browse files Browse the repository at this point in the history
  • Loading branch information
mltucker committed Aug 21, 2018
1 parent d1e90b1 commit 304d02a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/addons/dragAndDrop/EventContainerWrapper.js
Original file line number Diff line number Diff line change
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 304d02a

Please sign in to comment.