mirror of
https://github.com/penpot/penpot.git
synced 2025-04-15 08:21:40 -05:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
c2649ffd1c
5 changed files with 16 additions and 12 deletions
|
@ -698,11 +698,7 @@
|
|||
|
||||
(defn get-team-recent-files
|
||||
[conn team-id]
|
||||
(->> (db/exec! conn [sql:team-recent-files team-id])
|
||||
(mapv (fn [row]
|
||||
(if-let [media-id (:thumbnail-id row)]
|
||||
(assoc row :thumbnail-uri (resolve-public-uri media-id))
|
||||
(dissoc row :media-id))))))
|
||||
(db/exec! conn [sql:team-recent-files team-id]))
|
||||
|
||||
(def ^:private schema:get-team-recent-files
|
||||
[:map {:title "get-team-recent-files"}
|
||||
|
|
|
@ -881,6 +881,12 @@
|
|||
(rx/of
|
||||
(dwu/start-undo-transaction undo-id)
|
||||
(update-component shape-id undo-group)
|
||||
|
||||
;; These two calls are necessary for properly sync thumbnails
|
||||
;; when a main component does not live in the same page
|
||||
(update-component-thumbnail-sync state component-id file-id "frame")
|
||||
(update-component-thumbnail-sync state component-id file-id "component")
|
||||
|
||||
(sync-file current-file-id file-id :components component-id undo-group)
|
||||
(when (not current-file?)
|
||||
(sync-file file-id file-id :components component-id undo-group))
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
[{:keys [shape]}]
|
||||
(let [thumbnails? (mf/use-ctx muc/render-thumbnails)
|
||||
childs (mapv (d/getf objects) (:shapes shape))]
|
||||
(if (and thumbnails? (some? (:thumbnail shape)))
|
||||
(if (and thumbnails? (some? (:thumbnail-id shape)))
|
||||
[:& frame/frame-thumbnail {:shape shape :bounds (:children-bounds shape)}]
|
||||
[:& frame-shape {:shape shape :childs childs}])))))
|
||||
|
||||
|
|
|
@ -60,7 +60,6 @@
|
|||
(mf/defc frame-container
|
||||
{::mf/wrap-props false}
|
||||
[props]
|
||||
|
||||
(let [shape (unchecked-get props "shape")
|
||||
children (unchecked-get props "children")
|
||||
|
||||
|
|
|
@ -73,11 +73,14 @@
|
|||
;; it affects to the height calculation the browser does
|
||||
font-size (if (some #(not= "" (:text %)) (:children paragraph))
|
||||
"0"
|
||||
(:font-size styles (:font-size txt/default-text-attrs)))]
|
||||
(cond-> styles
|
||||
;; Every paragraph must have line-height to be correctly rendered
|
||||
(nil? (:line-height styles)) (assoc :line-height (:line-height txt/default-text-attrs))
|
||||
true (assoc :font-size font-size))))
|
||||
(:font-size styles (:font-size txt/default-text-attrs)))
|
||||
|
||||
line-height (:line-height styles)
|
||||
line-height (if (and (some? line-height) (not= "" line-height))
|
||||
line-height
|
||||
(:line-height txt/default-text-attrs))]
|
||||
(-> styles
|
||||
(assoc :font-size font-size :line-height line-height))))
|
||||
|
||||
(defn get-root-styles
|
||||
[root]
|
||||
|
|
Loading…
Add table
Reference in a new issue