mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 10:38:13 -05:00
✨ Adds layers options to texts
This commit is contained in:
parent
ec217d8201
commit
7ac78cb103
2 changed files with 9 additions and 0 deletions
|
@ -12,6 +12,7 @@
|
|||
[app.common.data :as d]
|
||||
[app.common.geom.shapes :as geom]
|
||||
[app.main.ui.context :as muc]
|
||||
[app.main.ui.shapes.attrs :as attrs]
|
||||
[app.main.ui.shapes.text.embed :as ste]
|
||||
[app.main.ui.shapes.text.styles :as sts]
|
||||
[app.util.color :as uc]
|
||||
|
@ -108,6 +109,7 @@
|
|||
:transform (geom/transform-matrix shape)
|
||||
:width (if (#{:auto-width} grow-type) 100000 width)
|
||||
:height (if (#{:auto-height :auto-width} grow-type) 100000 height)
|
||||
:style (-> (obj/new) (attrs/add-layer-props shape))
|
||||
:ref ref}
|
||||
[:& render-node {:index 0
|
||||
:shape shape
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
[app.main.refs :as refs]
|
||||
[app.main.ui.workspace.sidebar.options.menus.blur :refer [blur-menu]]
|
||||
[app.main.ui.workspace.sidebar.options.menus.fill :refer [fill-menu]]
|
||||
[app.main.ui.workspace.sidebar.options.menus.layer :refer [layer-attrs layer-menu]]
|
||||
[app.main.ui.workspace.sidebar.options.menus.measures :refer [measure-attrs measures-menu]]
|
||||
[app.main.ui.workspace.sidebar.options.menus.shadow :refer [shadow-menu]]
|
||||
[app.main.ui.workspace.sidebar.options.menus.text :refer [text-menu text-fill-attrs root-attrs paragraph-attrs text-attrs]]
|
||||
|
@ -27,6 +28,8 @@
|
|||
state-map (mf/deref refs/workspace-editor-state)
|
||||
editor-state (get state-map (:id shape))
|
||||
|
||||
layer-values (select-keys shape layer-attrs)
|
||||
|
||||
fill-values (dwt/current-text-values
|
||||
{:editor-state editor-state
|
||||
:shape shape
|
||||
|
@ -61,6 +64,10 @@
|
|||
:type type
|
||||
:values (select-keys shape measure-attrs)}]
|
||||
|
||||
[:& layer-menu {:ids ids
|
||||
:type type
|
||||
:values layer-values}]
|
||||
|
||||
[:& fill-menu
|
||||
{:ids ids
|
||||
:type type
|
||||
|
|
Loading…
Add table
Reference in a new issue