From 4940a0872c09f865d81ca557fc43784f6844edc4 Mon Sep 17 00:00:00 2001 From: "Weng, Chia-Ling" <75072960+ChiaLingWeng@users.noreply.github.com> Date: Tue, 30 Jan 2024 08:59:22 +0000 Subject: [PATCH] fix: remove default opacity if fillOpacity is set --- src/compile/mark/init.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compile/mark/init.ts b/src/compile/mark/init.ts index 3f7379cfc9..3c730e5d39 100644 --- a/src/compile/mark/init.ts +++ b/src/compile/mark/init.ts @@ -56,7 +56,8 @@ export function initMarkdef(originalMarkDef: MarkDef, encoding: Encoding // set opacity and filled if not specified in mark config const specifiedOpacity = getMarkPropOrConfig('opacity', markDef, config); - if (specifiedOpacity === undefined) { + const specifiedfillOpacity = getMarkPropOrConfig('fillOpacity', markDef, config); + if (specifiedOpacity === undefined && specifiedfillOpacity === undefined) { markDef.opacity = opacity(markDef.type, encoding); }