fix: progress bug, deselect bar by double click

This commit is contained in:
Safwan Samsudeen 2024-04-14 17:21:01 +05:30
parent 0afbf76881
commit c815dcd31a
2 changed files with 12 additions and 5 deletions

View File

@ -255,15 +255,22 @@ export default class Bar {
}
setup_click_event() {
let in_action = false;
$.on(this.group, "focus " + this.gantt.options.popup_trigger, (e) => {
if (this.action_completed) {
// just finished a move action, wait for a few seconds
return;
}
if (in_action) {
this.gantt.hide_popup();
this.group.classList.remove("active");
} else {
this.show_popup();
this.gantt.unselect_all();
this.group.classList.add("active");
}
this.show_popup();
this.gantt.unselect_all();
this.group.classList.add("active");
in_action = !in_action
});
$.on(this.group, "dblclick", (e) => {

View File

@ -950,11 +950,11 @@ export default class Gantt {
if (!($bar_progress && $bar_progress.finaldx)) return;
$bar_progress.finaldx = 0;
bar.progress_changed();
bar.set_action_completed();
bar = null;
$bar_progress = null;
$bar = null;
bar.progress_changed();
bar.set_action_completed();
});
}