-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Features requested #380
Labels
Comments
Thanks for the list! These sound good - though I don't fully get point 3. You want a different popup for a single click? |
I was thinking it would be very nice to have more of a single click handler, eg this on_click below actually triggers on double-click (unless I am doing it wrong), ganttChart = new Gantt('#gantt', tasks, {
header_height: 50,
view_modes: ['Quarter Day', 'Half Day', 'Day', 'Week', 'Month'],
view_mode: 'Day',
on_date_change: (task, start, end) => {
debouncedSave(task.id, 'start', start);
debouncedSave(task.id, 'end', end);
},
on_progress_change: function(task, progress) {
debouncedSave(task.id, 'progress', progress);
},
on_click: function(task) {
if (task.id.startsWith('task-')) {
const taskId = task.id.replace('task-', ''); // Extract the integer part
edit_task(taskId);
} else if (task.id.startsWith('group-')) {
const groupId = task.id.replace('group-', ''); // Extract the integer part
edit_group(groupId);
}
},
language: 'en'
}); |
@coda1024 for single click event trigger, you can put the code in the custom_popup_html{} function this.gantt = new Gantt(this.$refs.gantt, this.tasks, {
header_height: 50,
column_width: 30,
step: 10,
view_modes: ["Quarter Day", "Half Day", "Day", "Week", "Month"],
bar_height: 30,
bar_corner_radius: 10,
arrow_curve: 5,
padding: 18,
view_mode: this.view,
date_format: "YYYY-MM-DD",
custom_popup_html: (task) => {
// put single click code here
`;
}
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I dont know if you are taking feature requests but heres a few:
thanks
The text was updated successfully, but these errors were encountered: