0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-12 10:09:03 -05:00

🐛 Fix incorrect vertical align handling.

This commit is contained in:
Andrey Antukh 2021-04-09 09:12:14 +02:00
parent faff32203c
commit 09aa28a943
3 changed files with 10 additions and 8 deletions

View file

@ -105,6 +105,10 @@
%)))]
(attrs/get-attrs-multi nodes attrs)))
(defn current-root-values
[{:keys [attrs shape]}]
(shape-current-values shape txt/is-root-node? attrs))
(defn current-paragraph-values
[{:keys [editor-state attrs shape]}]
(if editor-state

View file

@ -67,8 +67,7 @@
(def shape-attrs
[:grow-type])
(def root-attrs
(d/concat text-valign-attrs text-align-attrs))
(def root-attrs text-valign-attrs)
(def paragraph-attrs
(d/concat text-align-attrs

View file

@ -42,12 +42,11 @@
(:fill fill-values) (assoc :fill-color (:fill fill-values))
(:opacity fill-values) (assoc :fill-opacity (:fill fill-values)))
text-values (merge
(select-keys shape [:grow-type :vertical-align :text-align])
#_(dwt/current-root-values
{:editor-state editor-state
:shape shape
:attrs root-attrs})
text-values (d/merge
(select-keys shape [:grow-type])
(dwt/current-root-values
{:shape shape
:attrs root-attrs})
(dwt/current-paragraph-values
{:editor-state editor-state
:shape shape