Merge branch 'demo'
This commit is contained in:
commit
c151416048
@ -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,
|
||||
});
|
||||
|
||||
13
src/index.js
13
src/index.js
@ -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();
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user