Skip to content

Commit

Permalink
feat(editor): to entity with ctrl arrow
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Oct 23, 2021
1 parent e4c9cba commit 0965c94
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/components/editor/entity/EditorEntityShow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@
if (e.altKey) {
e.preventDefault()
e.stopPropagation()
if (e.key === 'ArrowUp') {
// to up
onUpdateContent()
Expand Down Expand Up @@ -567,6 +567,29 @@
PROJECT.updateContext(CONTEXT.$state)
}
// to entity initial
if (e.key === 'ArrowUp') {
emitter.emit('entity-close', { all: true })
await nextTick
emitter.emit('entity-open', {
entity: props.entity,
up: true,
selectionInitial: true,
})
} else if (e.key === 'ArrowDown') {
emitter.emit('entity-close', { all: true })
await nextTick
emitter.emit('entity-open', {
entity: props.entity,
up: false,
selectionInitial: true,
})
}
} else {
// delete in empty raw or convert
if (
Expand Down

0 comments on commit 0965c94

Please sign in to comment.