commit
c34c09e837
@ -174,7 +174,7 @@ export default class Bar {
|
|||||||
append_to: this.handle_group,
|
append_to: this.handle_group,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.task.progress && this.task.progress < 100) {
|
if (this.task.progress < 100) {
|
||||||
this.$handle_progress = createSVG('polygon', {
|
this.$handle_progress = createSVG('polygon', {
|
||||||
points: this.get_progress_polygon_points().join(','),
|
points: this.get_progress_polygon_points().join(','),
|
||||||
class: 'handle progress',
|
class: 'handle progress',
|
||||||
@ -262,7 +262,7 @@ export default class Bar {
|
|||||||
}
|
}
|
||||||
this.update_attr(bar, 'x', x);
|
this.update_attr(bar, 'x', x);
|
||||||
}
|
}
|
||||||
if (width && width >= this.gantt.options.column_width) {
|
if (width) {
|
||||||
this.update_attr(bar, 'width', width);
|
this.update_attr(bar, 'width', width);
|
||||||
}
|
}
|
||||||
this.update_label_position();
|
this.update_label_position();
|
||||||
|
|||||||
@ -14,6 +14,9 @@ $handle-color: #ddd !default;
|
|||||||
$light-blue: #c4c4e9 !default;
|
$light-blue: #c4c4e9 !default;
|
||||||
|
|
||||||
.gantt {
|
.gantt {
|
||||||
|
user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
|
||||||
.grid-background {
|
.grid-background {
|
||||||
fill: none;
|
fill: none;
|
||||||
}
|
}
|
||||||
@ -69,7 +72,6 @@ $light-blue: #c4c4e9 !default;
|
|||||||
stroke: $bar-stroke;
|
stroke: $bar-stroke;
|
||||||
stroke-width: 0;
|
stroke-width: 0;
|
||||||
transition: stroke-width .3s ease;
|
transition: stroke-width .3s ease;
|
||||||
user-select: none;
|
|
||||||
}
|
}
|
||||||
.bar-progress {
|
.bar-progress {
|
||||||
fill: $blue;
|
fill: $blue;
|
||||||
|
|||||||
10
src/index.js
10
src/index.js
@ -526,7 +526,7 @@ export default class Gantt {
|
|||||||
|
|
||||||
get_date_info(date, last_date, i) {
|
get_date_info(date, last_date, i) {
|
||||||
if (!last_date) {
|
if (!last_date) {
|
||||||
last_date = date_utils.add(date, 1, 'year');
|
last_date = date_utils.add(date, 1, 'day');
|
||||||
}
|
}
|
||||||
const date_text = {
|
const date_text = {
|
||||||
'Quarter Day_lower': date_utils.format(
|
'Quarter Day_lower': date_utils.format(
|
||||||
@ -588,10 +588,10 @@ export default class Gantt {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const x_pos = {
|
const x_pos = {
|
||||||
'Quarter Day_lower': (this.options.column_width * 4) / 2,
|
'Quarter Day_lower': this.options.column_width / 2,
|
||||||
'Quarter Day_upper': 0,
|
'Quarter Day_upper': this.options.column_width * 2,
|
||||||
'Half Day_lower': (this.options.column_width * 2) / 2,
|
'Half Day_lower': this.options.column_width / 2,
|
||||||
'Half Day_upper': 0,
|
'Half Day_upper': this.options.column_width,
|
||||||
Day_lower: this.options.column_width / 2,
|
Day_lower: this.options.column_width / 2,
|
||||||
Day_upper: (this.options.column_width * 30) / 2,
|
Day_upper: (this.options.column_width * 30) / 2,
|
||||||
Week_lower: 0,
|
Week_lower: 0,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user