fix: minor ui issues
This commit is contained in:
parent
188ab1d35e
commit
02012fff05
@ -153,8 +153,8 @@ export default class Bar {
|
|||||||
y: this.y,
|
y: this.y,
|
||||||
width: this.progress_width,
|
width: this.progress_width,
|
||||||
height: this.height,
|
height: this.height,
|
||||||
rx: this.corner_radius,
|
rx: this.corner_radius + 2,
|
||||||
ry: this.corner_radius,
|
ry: this.corner_radius + 2,
|
||||||
class: 'bar-progress',
|
class: 'bar-progress',
|
||||||
append_to: this.bar_group,
|
append_to: this.bar_group,
|
||||||
});
|
});
|
||||||
|
|||||||
13
src/index.js
13
src/index.js
@ -228,9 +228,9 @@ export default class Gantt {
|
|||||||
if (typeof mode === 'string') {
|
if (typeof mode === 'string') {
|
||||||
mode = this.options.view_modes.find((d) => d.name === mode);
|
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) {
|
if (maintain_pos) {
|
||||||
old_date = this.current_date;
|
old_pos = this.$container.scrollLeft;
|
||||||
old_scroll_op = this.options.scroll_to;
|
old_scroll_op = this.options.scroll_to;
|
||||||
this.options.scroll_to = null;
|
this.options.scroll_to = null;
|
||||||
}
|
}
|
||||||
@ -240,11 +240,8 @@ export default class Gantt {
|
|||||||
this.setup_dates(maintain_pos);
|
this.setup_dates(maintain_pos);
|
||||||
this.render();
|
this.render();
|
||||||
if (maintain_pos) {
|
if (maintain_pos) {
|
||||||
|
this.$container.scrollLeft =old_pos;
|
||||||
this.options.scroll_to = old_scroll_op;
|
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]);
|
this.trigger_event('view_change', [mode]);
|
||||||
}
|
}
|
||||||
@ -1024,9 +1021,9 @@ export default class Gantt {
|
|||||||
|
|
||||||
bind_grid_click() {
|
bind_grid_click() {
|
||||||
$.on(
|
$.on(
|
||||||
this.$svg,
|
this.$container,
|
||||||
'click',
|
'click',
|
||||||
'.grid-row, .grid-header, .ignored-bar',
|
'.grid-row, .grid-header, .ignored-bar, .holiday-highlight',
|
||||||
() => {
|
() => {
|
||||||
this.unselect_all();
|
this.unselect_all();
|
||||||
this.hide_popup();
|
this.hide_popup();
|
||||||
|
|||||||
@ -274,6 +274,7 @@
|
|||||||
|
|
||||||
& .bar-progress {
|
& .bar-progress {
|
||||||
fill: var(--g-progress-color);
|
fill: var(--g-progress-color);
|
||||||
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
& .bar-expected-progress {
|
& .bar-expected-progress {
|
||||||
@ -320,16 +321,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
& .bar-wrapper {
|
& .bar-wrapper {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
& .bar {
|
& .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;
|
outline: 1px solid black;
|
||||||
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
--g-text-muted: #7c7c7c;
|
--g-text-muted: #7c7c7c;
|
||||||
--g-text-light: #fff;
|
--g-text-light: #fff;
|
||||||
--g-text-dark: #171717;
|
--g-text-dark: #171717;
|
||||||
--g-progress-color: #f3f3f3;
|
--g-progress-color: #dbdbdb;
|
||||||
--g-handle-color: #37352f;
|
--g-handle-color: #37352f;
|
||||||
--g-weekend-label-color: #dcdce4;
|
--g-weekend-label-color: #dcdce4;
|
||||||
--g-expected-progress: #c4c4e9;
|
--g-expected-progress: #c4c4e9;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user