fix: progress bug, deselect bar by double click
This commit is contained in:
parent
0afbf76881
commit
c815dcd31a
@ -255,15 +255,22 @@ export default class Bar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setup_click_event() {
|
setup_click_event() {
|
||||||
|
let in_action = false;
|
||||||
$.on(this.group, "focus " + this.gantt.options.popup_trigger, (e) => {
|
$.on(this.group, "focus " + this.gantt.options.popup_trigger, (e) => {
|
||||||
if (this.action_completed) {
|
if (this.action_completed) {
|
||||||
// just finished a move action, wait for a few seconds
|
// just finished a move action, wait for a few seconds
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (in_action) {
|
||||||
|
this.gantt.hide_popup();
|
||||||
|
this.group.classList.remove("active");
|
||||||
|
} else {
|
||||||
this.show_popup();
|
this.show_popup();
|
||||||
this.gantt.unselect_all();
|
this.gantt.unselect_all();
|
||||||
this.group.classList.add("active");
|
this.group.classList.add("active");
|
||||||
|
}
|
||||||
|
|
||||||
|
in_action = !in_action
|
||||||
});
|
});
|
||||||
|
|
||||||
$.on(this.group, "dblclick", (e) => {
|
$.on(this.group, "dblclick", (e) => {
|
||||||
|
|||||||
@ -950,11 +950,11 @@ export default class Gantt {
|
|||||||
if (!($bar_progress && $bar_progress.finaldx)) return;
|
if (!($bar_progress && $bar_progress.finaldx)) return;
|
||||||
|
|
||||||
$bar_progress.finaldx = 0;
|
$bar_progress.finaldx = 0;
|
||||||
|
bar.progress_changed();
|
||||||
|
bar.set_action_completed();
|
||||||
bar = null;
|
bar = null;
|
||||||
$bar_progress = null;
|
$bar_progress = null;
|
||||||
$bar = null;
|
$bar = null;
|
||||||
bar.progress_changed();
|
|
||||||
bar.set_action_completed();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user