Open coda1024 opened 6 months ago
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
`;
}
});
Hi, I dont know if you are taking feature requests but heres a few:
thanks