Corner radius configurable
This commit is contained in:
parent
d3d725c25e
commit
7d1f9b6bf1
3
dist/frappe-gantt.js
vendored
3
dist/frappe-gantt.js
vendored
@ -382,7 +382,7 @@ class Bar {
|
|||||||
this.height = this.gantt.options.bar_height;
|
this.height = this.gantt.options.bar_height;
|
||||||
this.x = this.compute_x();
|
this.x = this.compute_x();
|
||||||
this.y = this.compute_y();
|
this.y = this.compute_y();
|
||||||
this.corner_radius = 3;
|
this.corner_radius = this.gantt.options.bar_corner_radius;
|
||||||
this.duration =
|
this.duration =
|
||||||
(date_utils.diff(this.task._end, this.task._start, 'hour') + 24) /
|
(date_utils.diff(this.task._end, this.task._start, 'hour') + 24) /
|
||||||
this.gantt.options.step;
|
this.gantt.options.step;
|
||||||
@ -962,6 +962,7 @@ class Gantt {
|
|||||||
step: 24,
|
step: 24,
|
||||||
view_modes: ['Quarter Day', 'Half Day', 'Day', 'Week', 'Month'],
|
view_modes: ['Quarter Day', 'Half Day', 'Day', 'Week', 'Month'],
|
||||||
bar_height: 20,
|
bar_height: 20,
|
||||||
|
bar_corner_radius: 3,
|
||||||
arrow_curve: 5,
|
arrow_curve: 5,
|
||||||
padding: 18,
|
padding: 18,
|
||||||
view_mode: 'Day',
|
view_mode: 'Day',
|
||||||
|
|||||||
2
dist/frappe-gantt.min.js
vendored
2
dist/frappe-gantt.min.js
vendored
File diff suppressed because one or more lines are too long
@ -60,6 +60,7 @@
|
|||||||
tasks[5].custom_class = "bar-milestone";
|
tasks[5].custom_class = "bar-milestone";
|
||||||
|
|
||||||
var gantt_chart = new Gantt(".gantt-target", tasks, {
|
var gantt_chart = new Gantt(".gantt-target", tasks, {
|
||||||
|
bar_corner_radius: 5,
|
||||||
on_click: function (task) {
|
on_click: function (task) {
|
||||||
console.log(task);
|
console.log(task);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -25,7 +25,7 @@ export default class Bar {
|
|||||||
this.height = this.gantt.options.bar_height;
|
this.height = this.gantt.options.bar_height;
|
||||||
this.x = this.compute_x();
|
this.x = this.compute_x();
|
||||||
this.y = this.compute_y();
|
this.y = this.compute_y();
|
||||||
this.corner_radius = 3;
|
this.corner_radius = this.gantt.options.bar_corner_radius;
|
||||||
this.duration =
|
this.duration =
|
||||||
(date_utils.diff(this.task._end, this.task._start, 'hour') + 24) /
|
(date_utils.diff(this.task._end, this.task._start, 'hour') + 24) /
|
||||||
this.gantt.options.step;
|
this.gantt.options.step;
|
||||||
|
|||||||
@ -49,6 +49,7 @@ export default class Gantt {
|
|||||||
step: 24,
|
step: 24,
|
||||||
view_modes: ['Quarter Day', 'Half Day', 'Day', 'Week', 'Month'],
|
view_modes: ['Quarter Day', 'Half Day', 'Day', 'Week', 'Month'],
|
||||||
bar_height: 20,
|
bar_height: 20,
|
||||||
|
bar_corner_radius: 3,
|
||||||
arrow_curve: 5,
|
arrow_curve: 5,
|
||||||
padding: 18,
|
padding: 18,
|
||||||
view_mode: 'Day',
|
view_mode: 'Day',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user