Fix transparency toggle (#2964)
We recently changed the export checkbox `✅ Export Background` to `✅ Transparent` which are logically opposite, but we didn't flip the `checked` state of the checkbox so it was exporting the background when `Transparent` was checked! Fixes #2941 ### Change Type - [x] `patch` — Bug fix [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version ### Release Notes - Fixes the Transparent toggle. The condition was accidentally flipped.
This commit is contained in:
parent
d88ce929eb
commit
98850eb043
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ export function ToggleTransparentBgMenuItem() {
|
||||||
const editor = useEditor()
|
const editor = useEditor()
|
||||||
const isTransparentBg = useValue(
|
const isTransparentBg = useValue(
|
||||||
'isTransparentBg',
|
'isTransparentBg',
|
||||||
() => editor.getInstanceState().exportBackground,
|
() => !editor.getInstanceState().exportBackground,
|
||||||
[editor]
|
[editor]
|
||||||
)
|
)
|
||||||
return <TldrawUiMenuCheckboxItem {...actions['toggle-transparent']} checked={isTransparentBg} />
|
return <TldrawUiMenuCheckboxItem {...actions['toggle-transparent']} checked={isTransparentBg} />
|
||||||
|
|
Loading…
Reference in a new issue