Our pure JavaScript Scheduler component


Post by spirosft »

Hello,

This is my first post after joining a few days ago the Scheduler Pro world. Congrats on the great work you have put into this product!

The reason that I’m writing is because I need your help in the following scenario: When I Drag an Event, invalid resources are filtered out, leaving on screen visible only the valid ones, to make selection easier for the user, since there are too many Resources (Staff) loaded.

The problem is that the original Resource row from where the Event was dragged is changed (it’s moving many rows up) so there is a huge gap between the mouse pointer and the dragged Event, which is a normal behavior since the rows are changed after the Drag event has started.

Image

My first question is how can I reposition the dragged Event to the current Mouse position?

And the second question that I would like to make is if there is a Scheduler automated tracking/correction mechanism for such cases, that I’m not aware of and by enabling it and can fix this issue?

Another helpful feature, that I don’t know if it’s available, would be an automatic smart positioning of the event tooltip so when you move upwards the tooltip will be automatically positioned below the Event and when you change direction and start moving downwards, the tooltip will be automatically repositioned on top of the Event. In this way potential targets will not be covered by the tooltip.

The need for that smart behavior is because what I want to implement is having shifts on the resources (I’ve used Resource time ranges for that) and allocated Events in these shifts. So, my allocation is not only on the Resource level, but on the shift level of every resource and that’s why the Shifts must be always visible and not covered by the tooltip.

If there is not an automated smart repositioning mechanism in the Scheduler Pro, please propose an implementation or some tips if possible.

Thanks in advance!
Spiros


Post by spirosft »

Hi again,

To help you further, I'm uploading a video where hoth of the mentioned issues are visible :

https://screenrec.com/share/ijWuhaVM7D

Spiros


Post by marcio »

Hey spirosft,

Thanks for reaching out. We're delighted to have you here.

Have you tried to use the https://bryntum.com/products/schedulerpro/docs/api/Scheduler/feature/EventDrag#event-beforeEventDrag and try to filter the resources before the drag starts? We also have the https://bryntum.com/products/schedulerpro/docs/api/Scheduler/feature/EventDrag#config-snapToPosition which you could try to use and set to snap the drag to the mouse position.

Also, regarding the tooltip positioning, you could use the drag event, and do some calculations to identify if it's moving upwards or downwards, and from there, get the tooltip using https://bryntum.com/products/schedulerpro/docs/api/Core/widget/Tooltip#function-getById-static and change the position of the tooltip using y position https://bryntum.com/products/schedulerpro/docs/api/Core/widget/Tooltip#property-y.

If you could provide a sample demo with your filtering and configurations for us, we could check if there is other possible ways to implement what you're describing.

Best regards,
Márcio


Post by spirosft »

Hi Marcio,

Thx for your quick reply! I’m currently at full speed to deliver a project over the next days, so I’ll follow your instructions in a week or so and I’ll get back to you.

For the tooltip smart repositioning that was also my idea, but I wanted to check first if there was a build in feature before implementing my own 😉

Best Regards,
Spiros


Post by marcio »

Hey Spiros,

Thanks for the update and hope everything goes right in your project delivery.

We'll wait for updates.

Best regards,
Márcio


Post Reply