mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
fix: disable some conflicting whiteboard shortcuts
This commit is contained in:
@@ -41,6 +41,13 @@
|
||||
[]
|
||||
(when (get-tldr-app) js/tln.api))
|
||||
|
||||
(defn tldraw-idle?
|
||||
"return true when tldraw is active and idle. nil when tldraw is
|
||||
not active."
|
||||
[]
|
||||
(when-let [^js app (get-tldr-app)]
|
||||
(.. app -selectedTool (isIn "idle"))))
|
||||
|
||||
(defn create-page!
|
||||
[page-title]
|
||||
(when-let [app (get-tldr-app)]
|
||||
@@ -150,7 +157,7 @@
|
||||
:compact true
|
||||
:pageId (str block-id)
|
||||
:point point
|
||||
:size [600, 0]
|
||||
:size [400, 0]
|
||||
:type "logseq-portal"})
|
||||
|
||||
(defn add-new-block-shape!
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
(ns frontend.modules.shortcut.before
|
||||
(:require [frontend.state :as state]
|
||||
[frontend.util :as util]
|
||||
[frontend.mobile.util :as mobile-util]))
|
||||
[frontend.mobile.util :as mobile-util]
|
||||
[frontend.handler.whiteboard :as whiteboard]))
|
||||
|
||||
;; before function
|
||||
(defn prevent-default-behavior
|
||||
@@ -33,5 +34,6 @@
|
||||
[f]
|
||||
(fn [e]
|
||||
(when (or (contains? #{:srs} (state/get-modal-id))
|
||||
(not (state/block-component-editing?)))
|
||||
(not (state/block-component-editing?))
|
||||
(not (whiteboard/tldraw-idle?)))
|
||||
(f e))))
|
||||
|
||||
Reference in New Issue
Block a user