limit item dragging between groups (improve moveResizeValidator via dragGroupDelta)#787
limit item dragging between groups (improve moveResizeValidator via dragGroupDelta)#787Dexmaster wants to merge 1 commit intonamespace-ee:mainfrom
Conversation
|
@developer-ocansey — Flagging this for your review. Recommendation: Worth porting to the current TypeScript codebase What it doesExtends Why it's valuableThe ability to constrain item dragging to specific groups is a real scheduling requirement (e.g., "items from even rows can only move to even rows"). The current The implementation is clean:
What needs adaptationThe PR targets the old moveResizeValidator?: (action: 'move' | 'resize', item: TimelineItemBase<any>, time: number, resizeEdge?: ResizeEdge | null) => numberThis would need to be extended to accept the additional params and support the union return type. The Effort estimateMedium — focused changes to |
Issue Number 514
The closest issue I could find is #514
moveResizeValidator for dragging should be able to return time and groupDelta to block drag to specific group.
Overview of PR
Two more arguments added to moveResizeValidator:
Now moveResizeValidator can return either:
dragTimetimestamp in ms (integer) anddragGroupDeltafinal group index shift (integer) newAdded small demo with even/odd movement validation (item from even row can be moved to only even row and vice versa)