Skip to content

Commit

Permalink
Merge pull request #382 from safwansamsudeen/master
Browse files Browse the repository at this point in the history
Minor Fixes
  • Loading branch information
netchampfaris authored Apr 4, 2024
2 parents 05b243f + 7670d13 commit c34c09e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 3 additions & 1 deletion src/gantt.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ $handle-color: #ddd !default;
$light-blue: #c4c4e9 !default;

.gantt {
user-select: none;
-webkit-user-select: none;

.grid-background {
fill: none;
}
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit c34c09e

Please sign in to comment.