Skip to content

Commit

Permalink
improve(pdf): add prefix flag of internal properties
Browse files Browse the repository at this point in the history
  • Loading branch information
xyhp915 committed Jul 30, 2021
1 parent 11749f5 commit 92f29bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/main/frontend/components/block.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@
(util/uuid-string? id))
(let [block-id (uuid id)
block (db/pull-block block-id)
block-type (keyword (get-in block [:block/properties :type]))
block-type (keyword (get-in block [:block/properties :ls-type]))
repo (state/get-current-repo)]
(if block
[:div.block-ref-wrap.inline
Expand Down Expand Up @@ -1440,7 +1440,7 @@
(let [config (assoc config :block t)
slide? (boolean (:slide? config))
block-ref? (:block-ref? config)
block-type (or (keyword (:type properties)) :default)
block-type (or (keyword (:ls-type properties)) :default)
html-export? (:html-export? config)
checkbox (when (and (not pre-block?)
(not html-export?))
Expand Down Expand Up @@ -1664,7 +1664,7 @@
(let [collapsed? (get properties :collapsed)
block-ref? (:block-ref? config)
block-ref-with-title? (and block-ref? (seq title))
block-type (or (:type properties) :default)
block-type (or (:ls-type properties) :default)
dragging? (rum/react *dragging?)
content (if (string? content) (string/trim content) "")
mouse-down-key (if (util/ios?)
Expand Down
4 changes: 2 additions & 2 deletions src/main/frontend/extensions/pdf/assets.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@
(editor-handler/api-insert-new-block!
text {:page (:block/name ref-page)
:custom-uuid id
:properties {:type "annotation"
:id (str id) ;; force custom uuid
:properties {:ls-type "annotation"
:page page
:id (str id) ;; force custom uuid
}}))))))

(defn del-ref-block!
Expand Down

0 comments on commit 92f29bf

Please sign in to comment.