Comments (16)
@ANovokmet 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
- Automatic overlap resolution
- Task specific
magnetUnit
andmagnetAmount
- To delete a task with an inner button. We could display a popup or a context menu on right-click and display some additional options, like
delete task
. It would be pretty good and similar to some licensed gantt libraries.
from svelte-gantt.
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.
from 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.
from svelte-gantt.
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:
- subscribe to task
gantt.api.tasks.on.changed((task) => ... );
event. - use the updated task time with the rest of your data and check for overlaps
- update Gantt data with
gantt.$set({tasks});
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.
from svelte-gantt.
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
from svelte-gantt.
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
from svelte-gantt.
@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?
from svelte-gantt.
@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.
from svelte-gantt.
@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 gantt.current.api.tasks.on.change
, find the difference between from
and to
time, and set enableDragging
to false, but this has problems. First, if the min requirement is 20 minutes, the task should still be able to be extended (increased in length) and moved, just not decreased further. Moreover, I have tried to use gantt.current.api.tasks.move
to make sure this is happening when/during the user is dragging the task, but it does not seem to log anything, does that event listener work?
@fabiiomiiguel How are you implementing this at your end please?
from svelte-gantt.
Sorry I was a bit busy, this weekend I will put here some examples, ok?
from svelte-gantt.
@fabiiomiiguel can you sharing the code for the mode delete task? Please I need it for the my project. Thanks
from svelte-gantt.
@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.
from svelte-gantt.
@fabiiomiiguel Thank for respone. So Can someone help me do this? Becasue I'm using grantt-chart for my project.
from svelte-gantt.
@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 (mouseover)="showTooltip ($event)"
from svelte-gantt.
@ANovokmet 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
- Automatic overlap resolution
- Task specific
magnetUnit
andmagnetAmount
- To delete a task with an inner button. We could display a popup or a context menu on right-click and display some additional options, like
delete task
. It would be pretty good and similar to some licensed gantt libraries.
@ANovokmet can you add delete a task option. or is it there? how can I achieve it?
from svelte-gantt.
@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).
My use-case is a little long-winded to explain, but suffice to say that the very first time my app containing svelte-grid is used, all the legacy date ranges that the user has created in another system are dumped into a single row that has the name "uncategorized". This is because in the legacy system there's not equivalent concept to "row" (what I call "category" here). Part of the set-up experience for the user moving forward is to organise the date ranges into correctly-named rows/categories using svelte-grid, but it was very difficult to do that when so many tasks were overlapped on top of each other in the beginning. That's where my routine to split them up came in: to split the tasks up into a minimum number of resource Id's so that no overlapping of tasks exists... then the user has an easier time moving them around/renaming, etc. Happy to share code of the routine if this sounds something like what you need.
from svelte-gantt.
Related Issues (20)
- Expanded only work correctly for the first row HOT 1
- Make an option to print the entire gantt HOT 3
- dateAdapter HOT 1
- Custom styling for the whole gantt chart in svelte with tailwind or custom css? HOT 1
- Cannot read properties of undefined (reading '$$') HOT 2
- Custom task component HOT 1
- Row filtering HOT 2
- External draggable example not working HOT 3
- Can't get the demo to run locally HOT 3
- scaling manually HOT 3
- Fix: querySelector usage in selectTask() throws Uncaught DOMException HOT 1
- Event `gantt.api.timeranges.on.resized` returns previous `from` and `to` values HOT 2
- Collapsing parent rows dynamically results in unexpected child behavior HOT 1
- Block pulling tasks HOT 1
- How could I set the rowHeight for the target single row? HOT 7
- Task Color HOT 1
- Back to full year?
- Cannot synchronize scrolling HOT 1
- Dragging of tasks does not deselect previous selected task HOT 2
- TypeError: Cannot read properties of undefined (reading 'model') when updating rows and tasks HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svelte-gantt.