[ANGULAR] Scheduler event drag feature not working with vertical mode and custom time axis

Our pure JavaScript Scheduler component


Post Reply
User avatar
Hiba Rizk
Posts: 31
Joined: Thu Jan 23, 2020 3:51 pm

[ANGULAR] Scheduler event drag feature not working with vertical mode and custom time axis

Post by Hiba Rizk »

i'm using latest scheduler

I have a scheduler in a vertical mode and using a custom time axis. The customization is shown in the code below, for DAY units, the ticks are not going to be full 24-hour blocks, but 8-hour blocks to simulate the workday.

Code: Select all

timeAxis = {
        continuous : false,
        generateTicks(start, end, unit, increment) {
            const ticks = [];
            while (start < end) {
                if (unit !== 'hour' || start.getHours() >= 8 && start.getHours() <= 16) {
                    ticks.push({
                        id        : ticks.length + 1,
                        startDate : start,
                        endDate   : DateHelper.add(start, increment, unit)
                    });
                }
                start = DateHelper.add(start, increment, unit);
            }
            return ticks;
        }
    };
what i want to do is to prevent the user also from dragging the event from resource to another

The problem is that when I set the event drag constrainDragToResource true is not working

Code: Select all

eventDrag: {
	constrainDragToResource: true }
 },


i was able to reproduce this in your example link : https://www.bryntum.com/examples/scheduler/timeaxis/
and all that i have changes is :

Code: Select all

            features : {
                sort        : 'name',
                eventResize :false,
				eventDrag:{
					constrainDragToResource: true }
				},
			mode: 'vertical',
can you please let me know what is that i miss and is there a way to accomplish this behavior?
Thank you in advance

User avatar
pmiklashevich
Core Developer
Core Developer
Posts: 2772
Joined: Fri Apr 01, 2016 11:08 am

Re: [ANGULAR] Scheduler event drag feature not working with vertical mode and custom time axis

Post by pmiklashevich »

That's a bug! Ticket here: https://github.com/bryntum/support/issues/466
Thank you for the report!
Pavel Miklashevich - Core Developer

User avatar
Hiba Rizk
Posts: 31
Joined: Thu Jan 23, 2020 3:51 pm

Re: [ANGULAR] Scheduler event drag feature not working with vertical mode and custom time axis

Post by Hiba Rizk »

hello,

how do i get the fix ?

User avatar
pmiklashevich
Core Developer
Core Developer
Posts: 2772
Joined: Fri Apr 01, 2016 11:08 am

Re: [ANGULAR] Scheduler event drag feature not working with vertical mode and custom time axis

Post by pmiklashevich »

The fix will be a part of the next release and nightlies (starting from tomorrow).
Pavel Miklashevich - Core Developer

Post Reply