From 221e247a1e04678aeebe5ec92cd5061daa98d177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20W=C3=B6ginger?= Date: Sun, 26 May 2024 22:17:27 +0200 Subject: [PATCH] enable outdent node --- assets/js/hooks/events/listener.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/assets/js/hooks/events/listener.ts b/assets/js/hooks/events/listener.ts index 2f6149d3..ebb46ba1 100644 --- a/assets/js/hooks/events/listener.ts +++ b/assets/js/hooks/events/listener.ts @@ -132,14 +132,14 @@ export function keydown(event: KeyboardEvent) { if (event.shiftKey) { // outdent - // if (node.parent_id) { - // node.prev_id = node.parent_id; - // node.parent_id = undefined; - // updateItem(node, container); - - // focusItem(item); - // this.pushEvent("move_node", node); - // } + if (node.parent_id) { + node.prev_id = node.parent_id; + node.parent_id = prevNode?.parent_id; + updateItem(node, container); + + // focusItem(item); + this.pushEvent("move_node", node); + } } else { // indent if (node.prev_id) {