scottdurow / power-drag-drop

MIT License
131 stars 28 forks source link

How to prevent calendar items from scrolling independently of resources? #81

Open craigmday opened 2 months ago

craigmday commented 2 months ago

Hi,

I have created a task scheduler similar to Scott Durow's example, and I'm struggling to prevent the calendar area from scrolling independently of the resources (people).

I have set up my Drag and Drop components and galleries per the video: image

On my Home Calendar container, (cont_Home_Calendar) I have set the Vertical overflow to Scroll. On Resources Drag and Drop Component, and on my two sub galleries (gal_ResourceDate, gal_ResourceDateSlot), I have disabled scrolling.

I have set the Height of my gal_ResourceDate gallery to the height of the Resources Drag and Drop component, so the total heights match.

When I play the app and I scroll up or down in either the Resources Drag and Drop area, or using the parent container's scroll bar, it works perfectly and both the resources and the gallery scroll simultaneously. image

However, if I scroll within the calendar area, it scrolls the calendar independently of the other elements. I have gone through Scott's initial video on the creating a Drag and Drop scheduler many times, but I can't figure out what I am doing wrong.

Has anyone else gotten this working correctly?

craigmday commented 2 months ago

I found the problem. My Height calculation on my Resources Drag and Drop component included an adjustment for the gutter height, which seems to have caused an issue with the scrolling and the other galleries. I removed the gutter and it is working correctly. Not sure why it wouldn't work with the gutter, but it displays well without.