Merge branch 'master' into customViews
This commit is contained in:
commit
a08de40f47
2
dist/frappe-gantt.css
vendored
2
dist/frappe-gantt.css
vendored
File diff suppressed because one or more lines are too long
1312
dist/frappe-gantt.es.js
vendored
1312
dist/frappe-gantt.es.js
vendored
File diff suppressed because it is too large
Load Diff
23
dist/frappe-gantt.umd.js
vendored
23
dist/frappe-gantt.umd.js
vendored
File diff suppressed because one or more lines are too long
@ -108,10 +108,9 @@
|
|||||||
// on_hover (task, x, y) {
|
// on_hover (task, x, y) {
|
||||||
// console.log("Hover", x, y);
|
// console.log("Hover", x, y);
|
||||||
// }
|
// }
|
||||||
view_mode: 'Day',
|
view_mode: 'Custom Day',
|
||||||
view_mode_padding: { DAY: '3d' },
|
view_mode_padding: { DAY: '3d' },
|
||||||
// popup_on: 'click',
|
custom_view_modes: [
|
||||||
custom_view_modes: [//option to add custom views
|
|
||||||
{
|
{
|
||||||
name: 'Custom Day',
|
name: 'Custom Day',
|
||||||
padding: '1m',
|
padding: '1m',
|
||||||
@ -119,7 +118,8 @@
|
|||||||
unit: "day",
|
unit: "day",
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
// popup: false,
|
// popup_on: 'click',
|
||||||
|
// move_dependencies: false,
|
||||||
// scroll_to: 'today',
|
// scroll_to: 'today',
|
||||||
// view_mode_select: true,
|
// view_mode_select: true,
|
||||||
// dates_readonly: true,
|
// dates_readonly: true,
|
||||||
|
|||||||
@ -22,13 +22,13 @@
|
|||||||
--dark-blue: #2c94ec;
|
--dark-blue: #2c94ec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.gantt-container {
|
.gantt-container {
|
||||||
line-height: 14.5px;
|
line-height: 14.5px;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
height: 500px;
|
height: 500px;
|
||||||
|
width: fit-content;
|
||||||
|
|
||||||
& .popup-wrapper {
|
& .popup-wrapper {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -158,7 +158,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.gantt {
|
.gantt {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
@ -217,7 +216,7 @@
|
|||||||
stroke-width: 1;
|
stroke-width: 1;
|
||||||
stroke-dasharray: 5;
|
stroke-dasharray: 5;
|
||||||
|
|
||||||
&~.bar-label {
|
& ~ .bar-label {
|
||||||
fill: var(--text-light);
|
fill: var(--text-light);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -272,7 +271,6 @@
|
|||||||
& .bar-wrapper {
|
& .bar-wrapper {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
& .handle {
|
& .handle {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
|
|||||||
@ -36,6 +36,7 @@ const DEFAULT_OPTIONS = {
|
|||||||
padding: 18,
|
padding: 18,
|
||||||
view_mode: 'Day',
|
view_mode: 'Day',
|
||||||
date_format: 'YYYY-MM-DD',
|
date_format: 'YYYY-MM-DD',
|
||||||
|
move_dependencies: true,
|
||||||
show_expected_progress: false,
|
show_expected_progress: false,
|
||||||
popup: null,
|
popup: null,
|
||||||
popup_on: 'hover',
|
popup_on: 'hover',
|
||||||
@ -1085,10 +1086,16 @@ export default class Gantt {
|
|||||||
y_on_start = e.offsetY || e.layerY;
|
y_on_start = e.offsetY || e.layerY;
|
||||||
|
|
||||||
parent_bar_id = bar_wrapper.getAttribute('data-id');
|
parent_bar_id = bar_wrapper.getAttribute('data-id');
|
||||||
const ids = [
|
let ids;
|
||||||
|
if (this.options.move_dependencies) {
|
||||||
|
ids = [
|
||||||
parent_bar_id,
|
parent_bar_id,
|
||||||
...this.get_all_dependent_tasks(parent_bar_id),
|
...this.get_all_dependent_tasks(parent_bar_id),
|
||||||
];
|
];
|
||||||
|
} else {
|
||||||
|
ids = [parent_bar_id];
|
||||||
|
}
|
||||||
|
console.log('BARS', ids);
|
||||||
bars = ids.map((id) => this.get_bar(id));
|
bars = ids.map((id) => this.get_bar(id));
|
||||||
|
|
||||||
this.bar_being_dragged = parent_bar_id;
|
this.bar_being_dragged = parent_bar_id;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user