Corner radius configurable

This commit is contained in:
Faris Ansari 2018-02-17 23:39:58 +05:30
parent d3d725c25e
commit 7d1f9b6bf1
5 changed files with 6 additions and 3 deletions

View File

@ -382,7 +382,7 @@ class Bar {
this.height = this.gantt.options.bar_height;
this.x = this.compute_x();
this.y = this.compute_y();
this.corner_radius = 3;
this.corner_radius = this.gantt.options.bar_corner_radius;
this.duration =
(date_utils.diff(this.task._end, this.task._start, 'hour') + 24) /
this.gantt.options.step;
@ -962,6 +962,7 @@ class Gantt {
step: 24,
view_modes: ['Quarter Day', 'Half Day', 'Day', 'Week', 'Month'],
bar_height: 20,
bar_corner_radius: 3,
arrow_curve: 5,
padding: 18,
view_mode: 'Day',

File diff suppressed because one or more lines are too long

View File

@ -60,6 +60,7 @@
tasks[5].custom_class = "bar-milestone";
var gantt_chart = new Gantt(".gantt-target", tasks, {
bar_corner_radius: 5,
on_click: function (task) {
console.log(task);
},

View File

@ -25,7 +25,7 @@ export default class Bar {
this.height = this.gantt.options.bar_height;
this.x = this.compute_x();
this.y = this.compute_y();
this.corner_radius = 3;
this.corner_radius = this.gantt.options.bar_corner_radius;
this.duration =
(date_utils.diff(this.task._end, this.task._start, 'hour') + 24) /
this.gantt.options.step;

View File

@ -49,6 +49,7 @@ export default class Gantt {
step: 24,
view_modes: ['Quarter Day', 'Half Day', 'Day', 'Week', 'Month'],
bar_height: 20,
bar_corner_radius: 3,
arrow_curve: 5,
padding: 18,
view_mode: 'Day',