feat: add color to bars
This commit is contained in:
parent
34422d1886
commit
65ea2377db
@ -116,6 +116,7 @@ export default class Bar {
|
|||||||
: ''),
|
: ''),
|
||||||
append_to: this.bar_group,
|
append_to: this.bar_group,
|
||||||
});
|
});
|
||||||
|
if (this.task.color) this.$bar.style.fill = this.task.color;
|
||||||
animateSVG(this.$bar, 'width', 0, this.width);
|
animateSVG(this.$bar, 'width', 0, this.width);
|
||||||
|
|
||||||
if (this.invalid) {
|
if (this.invalid) {
|
||||||
@ -157,6 +158,8 @@ export default class Bar {
|
|||||||
class: 'bar-progress',
|
class: 'bar-progress',
|
||||||
append_to: this.bar_group,
|
append_to: this.bar_group,
|
||||||
});
|
});
|
||||||
|
if (this.task.color_progress)
|
||||||
|
this.$bar_progress.style.fill = this.task.color;
|
||||||
const x =
|
const x =
|
||||||
(date_utils.diff(
|
(date_utils.diff(
|
||||||
this.task._start,
|
this.task._start,
|
||||||
@ -205,7 +208,6 @@ export default class Bar {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
this.progress_width = progress_width;
|
this.progress_width = progress_width;
|
||||||
console.log(progress_width);
|
|
||||||
return progress_width;
|
return progress_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -308,7 +308,6 @@ export default class Gantt {
|
|||||||
padding_end.duration,
|
padding_end.duration,
|
||||||
padding_end.scale,
|
padding_end.scale,
|
||||||
);
|
);
|
||||||
console.log(this.gantt_start, this.gantt_end);
|
|
||||||
} else {
|
} else {
|
||||||
this.gantt_start = date_utils.add(
|
this.gantt_start = date_utils.add(
|
||||||
gantt_start,
|
gantt_start,
|
||||||
@ -325,7 +324,6 @@ export default class Gantt {
|
|||||||
this.config.format_string =
|
this.config.format_string =
|
||||||
this.config.view_mode.format_string || 'YYYY-MM-DD HH';
|
this.config.view_mode.format_string || 'YYYY-MM-DD HH';
|
||||||
this.gantt_start.setHours(0, 0, 0, 0);
|
this.gantt_start.setHours(0, 0, 0, 0);
|
||||||
console.log(this.gantt_start);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_date_values() {
|
setup_date_values() {
|
||||||
@ -1186,7 +1184,6 @@ export default class Gantt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$.on(this.$container, 'scroll', (e) => {
|
$.on(this.$container, 'scroll', (e) => {
|
||||||
console.log('f', e.target.scrollLeft);
|
|
||||||
let localBars = [];
|
let localBars = [];
|
||||||
const ids = this.bars.map(({ group }) =>
|
const ids = this.bars.map(({ group }) =>
|
||||||
group.getAttribute('data-id'),
|
group.getAttribute('data-id'),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user