Merge branch 'demo'

This commit is contained in:
Safwan Samsudeen 2025-01-16 11:54:23 +05:30
commit c151416048
4 changed files with 11 additions and 18 deletions

View File

@ -153,8 +153,8 @@ export default class Bar {
y: this.y,
width: this.progress_width,
height: this.height,
rx: this.corner_radius,
ry: this.corner_radius,
rx: this.corner_radius + 2,
ry: this.corner_radius + 2,
class: 'bar-progress',
append_to: this.bar_group,
});

View File

@ -228,9 +228,9 @@ export default class Gantt {
if (typeof mode === 'string') {
mode = this.options.view_modes.find((d) => d.name === mode);
}
let old_date, old_scroll_op;
let old_pos, old_scroll_op;
if (maintain_pos) {
old_date = this.current_date;
old_pos = this.$container.scrollLeft;
old_scroll_op = this.options.scroll_to;
this.options.scroll_to = null;
}
@ -240,11 +240,8 @@ export default class Gantt {
this.setup_dates(maintain_pos);
this.render();
if (maintain_pos) {
this.$container.scrollLeft =old_pos;
this.options.scroll_to = old_scroll_op;
this.$container.scrollLeft =
(date_utils.diff(old_date, this.gantt_start, this.config.unit) /
this.config.step) *
this.config.column_width;
}
this.trigger_event('view_change', [mode]);
}
@ -1024,9 +1021,9 @@ export default class Gantt {
bind_grid_click() {
$.on(
this.$svg,
this.$container,
'click',
'.grid-row, .grid-header, .ignored-bar',
'.grid-row, .grid-header, .ignored-bar, .holiday-highlight',
() => {
this.unselect_all();
this.hide_popup();

View File

@ -274,6 +274,7 @@
& .bar-progress {
fill: var(--g-progress-color);
border-radius: 4px;
}
& .bar-expected-progress {
@ -320,16 +321,11 @@
}
& .bar-wrapper {
cursor: pointer;
cursor: pointer;
& .bar {
-webkit-filter: drop-shadow(1px 1px 2px rgba(15, 15, 15, 0.2));
filter: drop-shadow(1px 1px 2px rgba(15, 15, 15, 0.2));
border-radius: 3px;
}
& .bar.safari {
outline: 1px solid black;
border-radius: 3px;
}
&:hover {

View File

@ -9,7 +9,7 @@
--g-text-muted: #7c7c7c;
--g-text-light: #fff;
--g-text-dark: #171717;
--g-progress-color: #f3f3f3;
--g-progress-color: #dbdbdb;
--g-handle-color: #37352f;
--g-weekend-label-color: #dcdce4;
--g-expected-progress: #c4c4e9;