|
|
|
@ -209,7 +209,26 @@ const buildPreviewGanttData = (scheduleList: any[]) => {
|
|
|
|
return { data: tasks, links }
|
|
|
|
return { data: tasks, links }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const cleanupTaskTooltips = () => {
|
|
|
|
|
|
|
|
const tooltipsExt = (gantt.ext as any)?.tooltips
|
|
|
|
|
|
|
|
const tooltip = tooltipsExt?.tooltip
|
|
|
|
|
|
|
|
if (tooltipsExt?.detach) {
|
|
|
|
|
|
|
|
tooltipsExt.detach('.gantt_task_line')
|
|
|
|
|
|
|
|
tooltipsExt.detach('.gantt_task_content')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tooltip?.hide) {
|
|
|
|
|
|
|
|
tooltip.hide()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const node = tooltip?.getNode?.()
|
|
|
|
|
|
|
|
if (node) {
|
|
|
|
|
|
|
|
node.style.display = 'none'
|
|
|
|
|
|
|
|
node.style.visibility = 'hidden'
|
|
|
|
|
|
|
|
node.style.opacity = '0'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const destroyGantt = () => {
|
|
|
|
const destroyGantt = () => {
|
|
|
|
|
|
|
|
cleanupTaskTooltips()
|
|
|
|
ganttEventIds.value.forEach((eventId) => gantt.detachEvent(eventId))
|
|
|
|
ganttEventIds.value.forEach((eventId) => gantt.detachEvent(eventId))
|
|
|
|
ganttEventIds.value = []
|
|
|
|
ganttEventIds.value = []
|
|
|
|
gantt.clearAll()
|
|
|
|
gantt.clearAll()
|
|
|
|
|