From a4dd2a434dd8b96d84c0977954fa2d725382550a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=BB=BA=E5=BD=A7?= Date: Thu, 7 Mar 2024 00:28:00 +0800 Subject: [PATCH] Update stacking-context.ts Fix error image use transfrom rotate style. > transform: translateX(15%) rotate(-12deg); Fixed at https://github.com/niklasvh/html2canvas/pull/2663 once. More info visite https://juejin.cn/post/7078594967970512932 --- src/render/stacking-context.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/stacking-context.ts b/src/render/stacking-context.ts index c5ac088b0..d02d36429 100644 --- a/src/render/stacking-context.ts +++ b/src/render/stacking-context.ts @@ -70,7 +70,6 @@ export class ElementPaint { while (parent) { const croplessEffects = parent.effects.filter((effect) => !isClipEffect(effect)); if (inFlow || parent.container.styles.position !== POSITION.STATIC || !parent.parent) { - effects.unshift(...croplessEffects); inFlow = [POSITION.ABSOLUTE, POSITION.FIXED].indexOf(parent.container.styles.position) === -1; if (parent.container.styles.overflowX !== OVERFLOW.VISIBLE) { const borderBox = calculateBorderBoxPath(parent.curves); @@ -81,6 +80,7 @@ export class ElementPaint { ); } } + effects.unshift(...croplessEffects); } else { effects.unshift(...croplessEffects); }