Skip to content

Commit

Permalink
enable outdent node
Browse files Browse the repository at this point in the history
  • Loading branch information
electronicbites committed May 26, 2024
1 parent 1f07873 commit 221e247
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions assets/js/hooks/events/listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 221e247

Please sign in to comment.