From 0965c94c3202510b9d7133bfe4542bdda7eaca82 Mon Sep 17 00:00:00 2001 From: Novout Date: Sat, 23 Oct 2021 13:08:46 -0300 Subject: [PATCH] feat(editor): to entity with ctrl arrow --- .../editor/entity/EditorEntityShow.vue | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/components/editor/entity/EditorEntityShow.vue b/src/components/editor/entity/EditorEntityShow.vue index d3d85ffa5..ea61c6b1c 100644 --- a/src/components/editor/entity/EditorEntityShow.vue +++ b/src/components/editor/entity/EditorEntityShow.vue @@ -483,7 +483,7 @@ if (e.altKey) { e.preventDefault() e.stopPropagation() - + if (e.key === 'ArrowUp') { // to up onUpdateContent() @@ -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 (