Our pure JavaScript Scheduler component


Post by striker »

Hello.
I am using newest SchedulerPro 4.1.2.

How to handle event beforeEventDrag as async like beforeEventDropFinalize?

https://www.bryntum.com/docs/scheduler-pro/#Scheduler/feature/EventDrag#event-beforeEventDrag

I see that context is deprecated. Why?

I need to check with some delay (200-500ms) can user drag event.
Greetings


Post by Maxim Gorkovsky »

Hello.
Because you should not need context anymore. Please refer to this upgrade guide section: https://bryntum.com/docs/scheduler/#Scheduler/guides/upgrades/4.1.1.md#scheduler-event-drag-events

Is there anything you're missing from the existing event signature?


Post by striker »

You didn't anwser to my question. how to handle beforeEventDrag as async.
in beforeEventDropFinalize I can use context.async = true and then .finalize() action.

In my cases I need to do something similar with beforeEventDrag event.


Post by Maxim Gorkovsky »

We do not support async beforeEventDrag event. I added a feature request: https://github.com/bryntum/support/issues/3256

As a workaround I can suggest using event model field to manage its draggable state: https://www.bryntum.com/docs/scheduler-pro/#Scheduler/model/EventModel#field-draggable
Start async procedure on https://www.bryntum.com/docs/scheduler-pro/#Scheduler/view/Scheduler#event-eventMouseOver then change event.draggable and somehow let user know event can be dragged


Post by striker »

Thanks, it works!


Post Reply