@@ -16,7 +16,7 @@ import { dndSelector, optionsSelector, viewSelector } from '@src/selectors';
1616import { DraggingState } from '@src/slices/dnd' ;
1717import { isSameDate } from '@src/time/datetime' ;
1818import { passConditionalProp } from '@src/utils/preact' ;
19- import { isNil } from '@src/utils/type' ;
19+ import { isPresent } from '@src/utils/type' ;
2020
2121import type { CalendarColor } from '@t/options' ;
2222
@@ -144,8 +144,9 @@ export function HorizontalEvent({
144144 const eventContainerRef = useRef < HTMLDivElement > ( null ) ;
145145
146146 const { isReadOnly, id, calendarId } = uiModel . model ;
147- const isDraggableEvent =
148- ! isReadOnlyCalendar && ! isReadOnly && isNil ( resizingWidth ) && isNil ( movingLeft ) ;
147+
148+ const isDraggingGuideEvent = isPresent ( resizingWidth ) || isPresent ( movingLeft ) ;
149+ const isDraggableEvent = ! isReadOnlyCalendar && ! isReadOnly && ! isDraggingGuideEvent ;
149150
150151 const startDragEvent = ( className : string ) => {
151152 setDraggingEventUIModel ( uiModel ) ;
@@ -160,8 +161,7 @@ export function HorizontalEvent({
160161 if (
161162 draggingState === DraggingState . DRAGGING &&
162163 draggingEventUIModel ?. cid ( ) === uiModel . cid ( ) &&
163- isNil ( resizingWidth ) &&
164- isNil ( movingLeft )
164+ ! isDraggingGuideEvent
165165 ) {
166166 setIsDraggingTarget ( true ) ;
167167 } else {
@@ -170,7 +170,7 @@ export function HorizontalEvent({
170170 } ) ;
171171
172172 useEffect ( ( ) => {
173- if ( isNil ( resizingWidth ) && isNil ( movingLeft ) ) {
173+ if ( ! isDraggingGuideEvent ) {
174174 eventBus . fire ( 'afterRenderEvent' , uiModel . model . toEventObject ( ) ) ;
175175 }
176176 // This effect is only for the first render.
0 commit comments