handle whiteboard built-in properties

This commit is contained in:
Tienson Qin
2023-08-01 21:48:36 +08:00
parent db5e0a6571
commit 8e9a189ba1
6 changed files with 41 additions and 29 deletions

View File

@@ -22,4 +22,13 @@
[block key]
(let [block (db/entity (:db/id block))]
(when-let [properties (:block/properties block)]
(lookup properties key))))
(lookup properties key))))
(defn block->shape [block]
(get-property block :logseq.tldraw.shape))
(defn page-block->tldr-page [block]
(get-property block :logseq.tldraw.page))
(defn shape-block? [block]
(= :whiteboard-shape (get-property block :ls-type)))