* [perf story #59018] updateCriticalPath for gantt wg.

This commit is contained in:
wangyidong
2024-07-15 10:04:18 +08:00
committed by 谢杞钰
parent b2a574cd8a
commit 9373e792d9
+17 -1
View File
@@ -113,7 +113,7 @@ function drawGanttToCanvas(exportType, successCallback, errorCallback)
{
if(progressTimer) clearInterval(progressTimer);
updateProgress(0.7);
html2canvas($ganttContainer[0], {logging: false}).then(function(canvas)
html2canvas($ganttContainer[0], {logging: false, scale: 1}).then(function(canvas)
{
let isExportPDF = exportType === 'pdf';
updateProgress(isExportPDF ? 0.8 : 0.9);
@@ -249,3 +249,19 @@ function zoomTasks(value)
gantt.render();
$('.gantt_grid_head_cell .sort').addClass(value);
}
/**
* Update criticalPath
*
* @access public
* @return void
*/
function updateCriticalPath()
{
let showCriticalPath = !gantt.config.highlight_critical_path;
$('#criticalPath').html(showCriticalPath ? ganttLang.hideCriticalPath : ganttLang.showCriticalP);
gantt.config.highlight_critical_path = showCriticalPath;
gantt.render();
}