bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
53 stars 6 forks source link

allowOverlap = false not working when dragging multiple events #6310

Closed matsbryntse closed 1 month ago

matsbryntse commented 1 year ago

Forum post

When I select multiple events using [ctrl] key, and drag the events to other resources inside the grid, the events still overlap. It's only the event that is being held by the mouse pointer that gets checked for overlapping. But when the it doesn't overlap, the other events that are being dragged with do not get checked for overlapping, so they overlap.

I am using version 5.2.10, trial version of Scheduler Pro.

matsbryntse commented 1 year ago
// https://github.com/bryntum/support/issues/6310
    t.iit('Should check for overlap against all affected resources when dragging multiple + allowOverlap is false', async t => {
        scheduler = await getScheduler({
            allowOverlap : false,
            assignments  : [
                { resourceId : 'r1', eventId : 1 },
                { resourceId : 'r2', eventId : 2 },
                { resourceId : 'r4', eventId : 3 },
                { resourceId : 'r5', eventId : 4 }
            ],
            events : [
                {
                    id        : 1,
                    name      : 'Event 1',
                    startDate : new Date(2011, 0, 6),
                    endDate   : new Date(2011, 0, 8)
                },
                {
                    id        : 2,
                    name      : 'Event 2',
                    startDate : new Date(2011, 0, 4),
                    endDate   : new Date(2011, 0, 6)
                },
                {
                    id        : 3,
                    name      : 'Event 3',
                    startDate : new Date(2011, 0, 5),
                    endDate   : new Date(2011, 0, 6)
                },
                {
                    id        : 4,
                    name      : 'Event 4',
                    startDate : new Date(2011, 0, 5),
                    endDate   : new Date(2011, 0, 6)
                }
            ]
        });

        t.wontFire(scheduler.eventStore, 'change');
        t.wontFire(scheduler.assignmentStore, 'change');

        scheduler.selectedEvents = [scheduler.eventStore.getAt(0), scheduler.eventStore.getAt(1)];

        await t.dragBy({ source : '.b-sch-event', delta : [0, 2 * scheduler.rowHeight], dragOnly : true });

        t.selectorExists('.b-tooltip:contains(Event overlaps)');

        await t.mouseUp();

        await t.waitForSelectorNotFound('.b-dragging');
    });
matsbryntse commented 3 months ago

https://forum.bryntum.com/viewtopic.php?t=29450

metratek commented 3 months ago

Hi, Is there any chance for this bug to be resolved? I see that it was first recorded more than one year ago.

matsbryntse commented 2 months ago

Hope to have it done in next patch, sorry for the wait. Now fingers crossed for green tests 🤞