Merge pull request #382 from safwansamsudeen/master

Minor Fixes
This commit is contained in:
Faris Ansari 2024-04-04 19:34:19 +05:30 committed by GitHub
commit c34c09e837
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 8 deletions

View File

@ -174,7 +174,7 @@ export default class Bar {
append_to: this.handle_group,
});
if (this.task.progress && this.task.progress < 100) {
if (this.task.progress < 100) {
this.$handle_progress = createSVG('polygon', {
points: this.get_progress_polygon_points().join(','),
class: 'handle progress',
@ -262,7 +262,7 @@ export default class Bar {
}
this.update_attr(bar, 'x', x);
}
if (width && width >= this.gantt.options.column_width) {
if (width) {
this.update_attr(bar, 'width', width);
}
this.update_label_position();

View File

@ -14,6 +14,9 @@ $handle-color: #ddd !default;
$light-blue: #c4c4e9 !default;
.gantt {
user-select: none;
-webkit-user-select: none;
.grid-background {
fill: none;
}
@ -69,7 +72,6 @@ $light-blue: #c4c4e9 !default;
stroke: $bar-stroke;
stroke-width: 0;
transition: stroke-width .3s ease;
user-select: none;
}
.bar-progress {
fill: $blue;

View File

@ -526,7 +526,7 @@ export default class Gantt {
get_date_info(date, last_date, i) {
if (!last_date) {
last_date = date_utils.add(date, 1, 'year');
last_date = date_utils.add(date, 1, 'day');
}
const date_text = {
'Quarter Day_lower': date_utils.format(
@ -588,10 +588,10 @@ export default class Gantt {
};
const x_pos = {
'Quarter Day_lower': (this.options.column_width * 4) / 2,
'Quarter Day_upper': 0,
'Half Day_lower': (this.options.column_width * 2) / 2,
'Half Day_upper': 0,
'Quarter Day_lower': this.options.column_width / 2,
'Quarter Day_upper': this.options.column_width * 2,
'Half Day_lower': this.options.column_width / 2,
'Half Day_upper': this.options.column_width,
Day_lower: this.options.column_width / 2,
Day_upper: (this.options.column_width * 30) / 2,
Week_lower: 0,