wip
This commit is contained in:
parent
61f2746cf9
commit
49c104d762
|
@ -66,6 +66,8 @@
|
||||||
componentTreeNodesStore.expandNodes([component._id])
|
componentTreeNodesStore.expandNodes([component._id])
|
||||||
},
|
},
|
||||||
["ArrowLeft"]: component => {
|
["ArrowLeft"]: component => {
|
||||||
|
// Select the collapsing root component to ensure the currently selected component is not
|
||||||
|
// hidden in a collapsed node
|
||||||
componentStore.select(component._id)
|
componentStore.select(component._id)
|
||||||
componentTreeNodesStore.collapseNodes([component._id])
|
componentTreeNodesStore.collapseNodes([component._id])
|
||||||
},
|
},
|
||||||
|
@ -74,8 +76,8 @@
|
||||||
componentTreeNodesStore.expandNodes(childIds)
|
componentTreeNodesStore.expandNodes(childIds)
|
||||||
},
|
},
|
||||||
["Ctrl+ArrowLeft"]: component => {
|
["Ctrl+ArrowLeft"]: component => {
|
||||||
// Select the collapsing root component to ensure the currently selected component is hidden
|
// Select the collapsing root component to ensure the currently selected component is not
|
||||||
// due to this action
|
// hidden in a collapsed node
|
||||||
componentStore.select(component._id)
|
componentStore.select(component._id)
|
||||||
|
|
||||||
const childIds = getChildIdsForComponent(component)
|
const childIds = getChildIdsForComponent(component)
|
||||||
|
|
|
@ -79,6 +79,11 @@
|
||||||
return findComponentPath($selectedComponent, component._id)?.length > 0
|
return findComponentPath($selectedComponent, component._id)?.length > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleIconClick = (componentId) => {
|
||||||
|
componentStore.select(componentId)
|
||||||
|
componentTreeNodesStore.toggleNode(componentId)
|
||||||
|
}
|
||||||
|
|
||||||
const hover = hoverStore.hover
|
const hover = hoverStore.hover
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -100,7 +105,7 @@
|
||||||
on:dragend={dndStore.actions.reset}
|
on:dragend={dndStore.actions.reset}
|
||||||
on:dragstart={() => dndStore.actions.dragstart(component)}
|
on:dragstart={() => dndStore.actions.dragstart(component)}
|
||||||
on:dragover={dragover(component, index)}
|
on:dragover={dragover(component, index)}
|
||||||
on:iconClick={() => componentTreeNodesStore.toggleNode(component._id)}
|
on:iconClick={() => handleIconClick(component._id)}
|
||||||
on:drop={onDrop}
|
on:drop={onDrop}
|
||||||
hovering={$hoverStore.componentId === component._id}
|
hovering={$hoverStore.componentId === component._id}
|
||||||
on:mouseenter={() => hover(component._id)}
|
on:mouseenter={() => hover(component._id)}
|
||||||
|
|
Loading…
Reference in New Issue