mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: show checkerboard pattern for transparent background in remove-bg tool
This commit is contained in:
@@ -607,11 +607,8 @@ export function RemoveBgSettings({ onBgPreview }: RemoveBgSettingsProps = {}) {
|
||||
const shadowEnabled = settings.shadowEnabled as boolean;
|
||||
const shadowOpacity = (settings.shadowOpacity as number) ?? 35;
|
||||
|
||||
// When no effects are active and background is transparent, show the
|
||||
// before/after slider instead of the CSS preview (pass null).
|
||||
const hasAnyEffect = blurEnabled || shadowEnabled || bgType !== "transparent";
|
||||
if (!hasAnyEffect) {
|
||||
onBgPreview(null);
|
||||
if (!blurEnabled && !shadowEnabled && bgType === "transparent") {
|
||||
onBgPreview({ showCheckerboard: true });
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user