From 3751689b9e740fcd14544bb4e236447157db4957 Mon Sep 17 00:00:00 2001 From: Weihua Lu Date: Fri, 16 Apr 2021 11:30:02 +0800 Subject: [PATCH] fix: add selection direction --- src/main/frontend/handler/editor.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/frontend/handler/editor.cljs b/src/main/frontend/handler/editor.cljs index adf7754d6..deee6325b 100644 --- a/src/main/frontend/handler/editor.cljs +++ b/src/main/frontend/handler/editor.cljs @@ -1066,12 +1066,12 @@ (defn highlight-selection-area! [end-block] - (when-let [start-block (:selection/start-block @state/state)] + (when-let [start-block (state/get-selection-start-block)] (clear-selection! nil) (let [blocks (util/get-nodes-between-two-nodes start-block end-block "ls-block") direction (util/get-direction-between-two-nodes start-block end-block "ls-block")] - (exit-editing-and-set-selected-blocks! blocks)))) + (exit-editing-and-set-selected-blocks! blocks direction)))) (defn on-select-block [direction]