* [perf story #59018] Set gantt config for initGantt for gantt wg.

This commit is contained in:
wangyidong
2024-07-15 10:04:18 +08:00
committed by 谢杞钰
parent e418f6bf43
commit 15cf32b25a
+19
View File
@@ -395,6 +395,25 @@ function initGantt()
if(!ganttData.data) ganttData.data = [];
gantt.serverList("userList", userList);
gantt.config.readonly = canGanttEdit ? false : true;
gantt.config.details_on_dblclick = false;
gantt.config.order_branch = ganttType == 'assignedTo' ? false : true;
gantt.config.drag_progress = false;
gantt.config.drag_links = false;
gantt.config.drag_move = ganttType == 'assignedTo' ? false : true;
gantt.config.drag_resize = ganttType == 'assignedTo' ? false : true;
gantt.config.smart_rendering = true;
gantt.config.smart_scales = true;
gantt.config.static_background = true;
gantt.config.show_task_cells = false;
gantt.config.row_height = 32;
gantt.config.min_column_width = 40;
gantt.config.details_on_create = false;
gantt.config.scales = [{unit: "year", step: 1, format: "%Y"}, {unit: 'day', step: 1, format: '%m-%d'}];
gantt.config.scale_height = 18 * gantt.config.scales.length;
gantt.config.duration_unit = "day";
if(!showChart) gantt.config.show_chart = false;
}
$(function()