Skip to content

Commit

Permalink
Use accessors when determining dnd height.
Browse files Browse the repository at this point in the history
For #917.
  • Loading branch information
mltucker committed Aug 17, 2018
1 parent 172c316 commit b61b45f
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 = ({ event }, point, node) => {
const { slotMetrics } = this.props
const { accessors, slotMetrics } = this.props

if (!pointerInColumn(node, point.x, point.y)) {
this.reset()
Expand All @@ -85,9 +85,11 @@ class EventContainerWrapper extends React.Component {
getBoundsForNode(node)
)

const eventStart = accessors.start(event)
const 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 b61b45f

Please sign in to comment.