Our pure JavaScript Scheduler component


Post by plus »

I have this problem when I drag an event upon an other
(img1)
But wath I want Is that if the period is busy, the event will be put under the others
(img2)
I've noticed this happening since I ran the event beforeEventDropFinalize, but in this case, the only thing I do is
context.finalize(true);

this.resourcesScheduler.on('beforeEventDropFinalize', ({ context }) => {
      if (context.record.data.event.origineDato != undefined) {
        context.finalize(true);
        //const resourcesScheduler = window.getSchedulersComponent().resourcesScheduler;
        //const res = context.resourceRecord;
        //resourcesScheduler.repaintEventsForResource(res)
      } else {

I even tried to put this prameters in configuration

eventLayout: 'stack',
allowOverlap : false,

but doesn't work

Can you help me?
Where can be the problem?

Thanks and best regards

Attachments
img2.png
img2.png (73.48 KiB) Viewed 803 times
img1.png
img1.png (92.85 KiB) Viewed 803 times

Post by pmiklashevich »

Pavlo Miklashevych
Sr. Frontend Developer


Post by plus »

I saw your ticket and I tried your example runnig this in console

bryntum.query('scheduler').on('beforeEventDropFinalize', ({ context }) => {
    console.log('finalized');
    context.finalize(true);
})

I saw that the problem is when I drag en event from a resource to the same
If I drag en event from a resource to a different resource event are redrawed in stack mode correctly

Can be this information useful to solve the problem?


Post by alex.l »

Hi plus,

Thanks for debugging! Any extra info is helpful on bug fixing!

All the best,
Alex

All the best,
Alex


Post Reply