-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an option that prevents tasks to overlap #19
Comments
Sounds nice. If we do this on task "drop", at first it looks like it should not be too complex. But when you take a case where there's a bunch of tasks one next to another it becomes more complex. Do you move only the first task or chain move all the tasks... Do you have a use case for this? It might be too specific, and it could be implemented without changing svelte-gantt. |
My use case is that I have orders for some driver to deliver, but of course he can't make two orders at the same time. So when a new order (task) is dragged to one driver, this new task should not override others and should go forward or backward. |
I suggest you try to implement it using events. On task dropped read their data and correct their times if needed. Then if it works well we could include it within the library. So basically:
I think the biggest challenge here is to update data so there are positively no overlaps. #7 (comment) also asked if there's a way to move conflicted tasks so maybe it's a more desirable feature than I think. |
Yes I know, I was doing that on my side, another cool feature is to set the min and max resize time of one task, like min 1 hour, and we couldn't resize the task below than one hour |
Another thing that I do on my side of the code and could be nice exists by default, is to delete a task from the gantt with a inner button |
@ANovokmet Relating to overlapping events, it'd be nice if for example Row 1 has two overlapping tasks, the overlapping task is displayed below the first task. So in the same row...but the row gets bigger (in height) and the overlapping task(s) is displayed in the same row but below the first task instead of being hidden behind it. Is this possible to implement please? |
@darekeapp this is something I've had in mind but I doubt It will anytime soon be implemented since it is a big feature, and pretty much just a cosmetical one. If someone could help devise an algorithm that organizes a number of tasks into a minimal number of rows so they do not overlap anywhere, just how you described, that would be at least half of the work done. Once again, it sounds good and something I've thought about. @fabiiomiiguel these sound like good features. Maybe you could open up feature requests so they are more easily tracked. For now we have
|
@ANovokmet Relating to right clicking to display context menu, the tasks could also have on hover which displays a box which contains details about the task e.g. from and to, or any other additional notes. |
@ANovokmet Could you please show how to set the min and max resize time of one task? What I am trying to achieve is not only that the tasks do NOT get resized if min and/or max limit reached, but also they CAN be moved around as they are still fulfilling the requirements of the min and max times. UPDATE: I have tried to on @fabiiomiiguel How are you implementing this at your end please? |
Sorry I was a bit busy, this weekend I will put here some examples, ok? |
@fabiiomiiguel can you sharing the code for the mode delete task? Please I need it for the my project. Thanks |
@darekeapp @nguyenhuuthinh111 I didn't post any code yet, because I leave the project where I did that. I will need some time to create that. |
@fabiiomiiguel Thank for respone. So Can someone help me do this? Becasue I'm using grantt-chart for my project. |
@ANovokmet Hi man is it possible to implement a new event on mouseover. In my case should display a kind of tooltip with some data. Any suggestion? I would like to bind |
@ANovokmet can you add delete a task option. or is it there? how can I achieve it? |
@fabiiomiiguel , just yesterday, I implemented a routine (in my own code) for moving overlapping tasks into a new resourceId, or, if the overlapping task can go into a resourceId previously created without overlapping there, then re-use that one. Then today I stumbled across your change request :-) I'm using svelte-grid as a means to define 'seasons' within rows that represent 'catagories' (for example, city pairs for air travel: different city pairs can have very different seasonalities throughout the year). |
Maybe it will be nice to have an optional prop, for when a task is dragged, move the overlapped task forward or backward.
The text was updated successfully, but these errors were encountered: