diff --git a/src/addons/dragAndDrop/WeekWrapper.js b/src/addons/dragAndDrop/WeekWrapper.js index ad9517787..c302785c6 100644 --- a/src/addons/dragAndDrop/WeekWrapper.js +++ b/src/addons/dragAndDrop/WeekWrapper.js @@ -65,7 +65,7 @@ class WeekWrapper extends React.Component { const slot = getSlotAtX( bounds, - point.x - this.eventOffsetLeft, + point.x, rtl, slotMetrics.slots ) @@ -160,15 +160,6 @@ class WeekWrapper extends React.Component { const { isAllDay } = this.props const { action } = this.context.draggable.dragAndDropAction const bounds = getBoundsForNode(node) - - // eventOffsetLeft is distance from the left of the event to the initial - // mouseDown position. We need this later to compute the new top of the - // event during move operations, since the final location is really a - // delta from this point. note: if we want to DRY this with - // EventContainerWrapper, probably better just to capture the mouseDown - // point here and do the placement computation in handleMove()... - this.eventOffsetLeft = point.x - bounds.left - const isInBox = pointInBox(bounds, point) return ( action === 'move' || (action === 'resize' && (!isAllDay || isInBox))