Page 1 of 1

Event drop outside visible range

Posted: Tue Feb 07, 2017 4:51 pm
by dimehb
Hi,

I am trying to figure out the differences between these two demos:
1: https://www.bryntum.com/examples/schedul ... iguration/
2: https://www.bryntum.com/examples/schedul ... les/events

Steps to take to see the difference:
- Start dragging an event
- Drag the event to the edge of the scheduler
- Make sure that part of the event is dragged outside the visible range (i.e. the end date is later than the end date of the scheduler)
- Drop the event

Result for demo 1: The event is actually dropped at that time
Result for demo 2: The event bounces back to the original location

What configuration determines the behavior for demo #1? This is the behavior I want but I need to figure out how to configure this. Is this configuration on the scheduler level or perhaps time axis?

Any help would be appreciated.

Re: Event drop outside visible range

Posted: Wed Feb 08, 2017 3:57 pm
by Maxim Gorkovsky
Hello.
Normally you would get behavior from first example. Second one differs, because we use custom, non-continuous time axis. Drag drop plugin will try to calculate new start/end for event, but in case of non-continuous time axis it cannot calculate dates properly when you drag outside of view.
Time axis will become non-continuous when you:
1) filter it
2) set such config directly

Re: Event drop outside visible range

Posted: Wed Feb 08, 2017 4:05 pm
by dimehb
Yes that's correct, I arrived to the same conclusion this morning!
By setting the continuous flag on Sch.data.TimeAxis to true, it works. I don't think we need a non-continuous time axis in our case so I suppose that solved the issue.

I also noticed I posted this question in the wrong subforum.

Re: Event drop outside visible range

Posted: Thu Feb 09, 2017 11:40 am
by Maxim Gorkovsky
We discussed this behavior locally and decided to improve it. Here is ticket: https://app.assembla.com/spaces/bryntum/tickets/4099

Thank you for the feedback.

Re: Event drop outside visible range

Posted: Tue Mar 21, 2017 6:07 pm
by dimett
Hi,

After discussing this internally it seems we do need a non-continuous time axis in some cases (hiding weekend, or hiding night times in day view). Would there be another way to make it possible to drag outside of the visible range without making the time axis continuous?

Thank you very much in advance.
Tom