Skip to content
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

Custom Index added for each tasks to support multiple tasks in same row #396

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "frappe-gantt",
"name": "frappe-gantt-vermillion",
"version": "0.6.1",
"description": "A simple, modern, interactive gantt library for the web",
"main": "src/index.js",
Expand All @@ -14,7 +14,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/frappe/gantt.git"
"url": "git+https://github.com/apar-adhikari/gantt"
},
"files": [
"src",
Expand Down Expand Up @@ -48,5 +48,8 @@
},
"eslintIgnore": [
"dist"
]
],
"directories": {
"test": "tests"
}
}
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ export default class Gantt {
// cache index
task._index = i;

// To support tasks for same row
if (typeof task.custom_index === 'number') {
task._index = task.custom_index;
}

// invalid dates
if (!task.start && !task.end) {
const today = date_utils.today();
Expand Down