From f773f285fe42f3a0e12509b742cb8e4287a25981 Mon Sep 17 00:00:00 2001 From: zhangwen <1062680993@qq.com> Date: Thu, 20 Aug 2020 11:04:09 +0800 Subject: [PATCH] fix: fix print error --- packages/gantt/src/components/links/links.component.html | 2 +- packages/gantt/src/gantt-print.service.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/gantt/src/components/links/links.component.html b/packages/gantt/src/components/links/links.component.html index e3083ed1..68be994c 100644 --- a/packages/gantt/src/components/links/links.component.html +++ b/packages/gantt/src/components/links/links.component.html @@ -1,4 +1,4 @@ - + diff --git a/packages/gantt/src/gantt-print.service.ts b/packages/gantt/src/gantt-print.service.ts index 6d70488c..272cafe4 100644 --- a/packages/gantt/src/gantt-print.service.ts +++ b/packages/gantt/src/gantt-print.service.ts @@ -74,14 +74,20 @@ export class GanttPrintService { const ganttClass = root.className; const cloneGanttDom = cloneDocument.querySelector(`.${ganttClass.replace(/\s+/g, '.')}`) as HTMLElement; const cloneCalendarOverlay = cloneDocument.querySelector('.gantt-calendar-overlay-main') as HTMLElement; + const cloneLinksOverlay = cloneDocument.querySelector('.gantt-links-overlay-main') as HTMLElement; // change targetDom width cloneGanttDom.style.width = `${printWidth}px`; cloneGanttDom.style.height = `${printHeight}px`; cloneGanttDom.style.overflow = `unset`; cloneCalendarOverlay.setAttribute('height', `${printHeight}`); + cloneCalendarOverlay.style.height = `${printHeight}px`; cloneCalendarOverlay.style.background = 'transparent'; + if (cloneLinksOverlay) { + cloneLinksOverlay.style.height = `${printHeight}px`; + } + // setInlineStyles for svg this.setInlineStyles(cloneGanttDom); }