mirror of
https://github.com/penpot/penpot.git
synced 2025-07-24 00:27:13 +02: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.data :as d]
|
||||||
[app.common.geom.shapes :as geom]
|
[app.common.geom.shapes :as geom]
|
||||||
[app.main.ui.context :as muc]
|
[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.embed :as ste]
|
||||||
[app.main.ui.shapes.text.styles :as sts]
|
[app.main.ui.shapes.text.styles :as sts]
|
||||||
[app.util.color :as uc]
|
[app.util.color :as uc]
|
||||||
|
@ -108,6 +109,7 @@
|
||||||
:transform (geom/transform-matrix shape)
|
:transform (geom/transform-matrix shape)
|
||||||
:width (if (#{:auto-width} grow-type) 100000 width)
|
:width (if (#{:auto-width} grow-type) 100000 width)
|
||||||
:height (if (#{:auto-height :auto-width} grow-type) 100000 height)
|
:height (if (#{:auto-height :auto-width} grow-type) 100000 height)
|
||||||
|
:style (-> (obj/new) (attrs/add-layer-props shape))
|
||||||
:ref ref}
|
:ref ref}
|
||||||
[:& render-node {:index 0
|
[:& render-node {:index 0
|
||||||
:shape shape
|
:shape shape
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
[app.main.ui.workspace.sidebar.options.menus.blur :refer [blur-menu]]
|
[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.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.measures :refer [measure-attrs measures-menu]]
|
||||||
[app.main.ui.workspace.sidebar.options.menus.shadow :refer [shadow-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]]
|
[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)
|
state-map (mf/deref refs/workspace-editor-state)
|
||||||
editor-state (get state-map (:id shape))
|
editor-state (get state-map (:id shape))
|
||||||
|
|
||||||
|
layer-values (select-keys shape layer-attrs)
|
||||||
|
|
||||||
fill-values (dwt/current-text-values
|
fill-values (dwt/current-text-values
|
||||||
{:editor-state editor-state
|
{:editor-state editor-state
|
||||||
:shape shape
|
:shape shape
|
||||||
|
@ -61,6 +64,10 @@
|
||||||
:type type
|
:type type
|
||||||
:values (select-keys shape measure-attrs)}]
|
:values (select-keys shape measure-attrs)}]
|
||||||
|
|
||||||
|
[:& layer-menu {:ids ids
|
||||||
|
:type type
|
||||||
|
:values layer-values}]
|
||||||
|
|
||||||
[:& fill-menu
|
[:& fill-menu
|
||||||
{:ids ids
|
{:ids ids
|
||||||
:type type
|
:type type
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue