Disable eject for blocks if ejectable has been set to false
This commit is contained in:
parent
c0bd897b15
commit
47e04c363c
|
@ -7,6 +7,7 @@
|
||||||
$: definition = store.actions.components.getDefinition(component?._component)
|
$: definition = store.actions.components.getDefinition(component?._component)
|
||||||
$: noPaste = !$store.componentToPaste
|
$: noPaste = !$store.componentToPaste
|
||||||
$: isBlock = definition?.block === true
|
$: isBlock = definition?.block === true
|
||||||
|
$: canEject = !(definition?.ejectable === false)
|
||||||
|
|
||||||
const keyboardEvent = (key, ctrlKey = false) => {
|
const keyboardEvent = (key, ctrlKey = false) => {
|
||||||
document.dispatchEvent(
|
document.dispatchEvent(
|
||||||
|
@ -32,7 +33,7 @@
|
||||||
>
|
>
|
||||||
Delete
|
Delete
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
{#if isBlock}
|
{#if isBlock && canEject}
|
||||||
<MenuItem
|
<MenuItem
|
||||||
icon="Export"
|
icon="Export"
|
||||||
keyBind="Ctrl+E"
|
keyBind="Ctrl+E"
|
||||||
|
|
Loading…
Reference in New Issue