fix: progress bug

This commit is contained in:
Safwan Samsudeen 2025-01-23 11:48:04 +05:30
parent 0e2c8dadbe
commit 6311a1e32f
3 changed files with 2 additions and 2 deletions

View File

@ -326,6 +326,7 @@
new Date().getTimezoneOffset() * 60000;
function random(begin = 10, end = 90, multiple = 10) {
return undefined
let k;
do {
k = Math.floor(Math.random() * 100);

View File

@ -56,7 +56,7 @@ export default class Bar {
this.compute_duration();
this.corner_radius = this.gantt.options.bar_corner_radius;
this.width = this.gantt.config.column_width * this.duration;
if (this.task.progress < 0) this.task.progress = 0;
if (!this.task.progress || this.task.progress < 0) this.task.progress = 0;
if (this.task.progress > 100) this.task.progress = 100;
}

View File

@ -1335,7 +1335,6 @@ export default class Gantt {
bind_bar_progress() {
let x_on_start = 0;
let y_on_start = 0;
let is_resizing = null;
let bar = null;
let $bar_progress = null;