fix: date higlight

This commit is contained in:
Safwan Samsudeen 2024-04-27 16:58:41 +05:30
parent a72b75a2f1
commit 0cefc57624
2 changed files with 5 additions and 5 deletions

View File

@ -149,10 +149,10 @@ export default class Bar {
$date_highlight.classList.add('date-highlight') $date_highlight.classList.add('date-highlight')
$date_highlight.style.height = this.height * 0.8 + 'px' $date_highlight.style.height = this.height * 0.8 + 'px'
$date_highlight.style.width = this.width + 'px' $date_highlight.style.width = this.width + 'px'
$date_highlight.style.top = this.gantt.options.header_height - 21 + 'px' $date_highlight.style.top = this.gantt.options.header_height - 19 + 'px'
$date_highlight.style.left = x + 'px' $date_highlight.style.left = x + 'px'
this.$date_highlight = $date_highlight this.$date_highlight = $date_highlight
this.gantt.$lower_header.appendChild($date_highlight) this.gantt.$lower_header.prepend($date_highlight)
@ -334,11 +334,11 @@ export default class Bar {
return; return;
} }
this.update_attr(bar, "x", x); this.update_attr(bar, "x", x);
this.update_attr(this.$date_highlight, "x", x); this.$date_highlight.style.left = x + 'px'
} }
if (width) { if (width) {
this.update_attr(bar, "width", width); this.update_attr(bar, "width", width);
this.update_attr(this.$date_highlight, "width", width); this.$date_highlight.style.width = width + 'px'
} }
this.update_label_position(); this.update_label_position();
this.update_handle_position(); this.update_handle_position();

View File

@ -68,7 +68,7 @@ $light-blue: #c4c4e9 !default;
} }
.date-highlight { .date-highlight {
border: 2px dotted black; background-color: $text-muted;
border-radius: 12px; border-radius: 12px;
z-index: 1; z-index: 1;
position: absolute; position: absolute;