fix: progress bug, deselect bar by double click
This commit is contained in:
parent
0afbf76881
commit
c815dcd31a
13
src/bar.js
13
src/bar.js
@ -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) => {
|
||||
|
||||
@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user