|
|
@@ -2,6 +2,7 @@
|
|
|
(:require [clojure.set :as set]
|
|
|
[clojure.string :as string]
|
|
|
[clojure.walk :as w]
|
|
|
+ [dommy.core :as d]
|
|
|
[dommy.core :as dom]
|
|
|
[electron.ipc :as ipc]
|
|
|
[frontend.commands :as commands]
|
|
|
@@ -1242,15 +1243,20 @@
|
|
|
|
|
|
(defonce *action-bar-timeout (atom nil))
|
|
|
|
|
|
+(defn popup-exists?
|
|
|
+ [id]
|
|
|
+ (some->> (shui-popup/get-popups)
|
|
|
+ (some #(some-> % (:id) (str) (string/includes? (str id))))))
|
|
|
+
|
|
|
(defn show-action-bar!
|
|
|
[& {:keys [delay]
|
|
|
:or {delay 200}}]
|
|
|
- (when (config/db-based-graph?)
|
|
|
+ (when (and (config/db-based-graph?) (not (popup-exists? :selection-action-bar)))
|
|
|
(when-let [timeout @*action-bar-timeout]
|
|
|
(js/clearTimeout timeout))
|
|
|
(state/pub-event! [:editor/hide-action-bar])
|
|
|
-
|
|
|
- (when (seq (state/get-selection-blocks))
|
|
|
+ (when (seq (remove (fn [b] (d/has-class? b "ls-table-cell"))
|
|
|
+ (state/get-selection-blocks)))
|
|
|
(let [timeout (js/setTimeout #(state/pub-event! [:editor/show-action-bar]) delay)]
|
|
|
(reset! *action-bar-timeout timeout)))))
|
|
|
|
|
|
@@ -3325,11 +3331,6 @@
|
|
|
(cursor/select-up-down input direction anchor cursor-rect)))
|
|
|
(select-block-up-down direction))))
|
|
|
|
|
|
-(defn popup-exists?
|
|
|
- [id]
|
|
|
- (some->> (shui-popup/get-popups)
|
|
|
- (some #(some-> % (:id) (str) (string/includes? (str id))))))
|
|
|
-
|
|
|
(defn editor-commands-popup-exists?
|
|
|
[]
|
|
|
(popup-exists? "editor.commands"))
|