0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 00:10:11 -05:00

🐛 Fix viewer layers styles

This commit is contained in:
alonso.torres 2023-03-13 09:50:25 +01:00
parent 0d9695de1d
commit 83367dd519

View file

@ -7,6 +7,7 @@
(ns app.main.ui.viewer.inspect.left-sidebar
(:require
[app.common.data :as d]
[app.common.types.shape.layout :as ctl]
[app.main.data.viewer :as dv]
[app.main.store :as st]
[app.main.ui.components.shape-icon :as si]
@ -34,7 +35,7 @@
(make-collapsed-iref id))
expanded? (not (mf/deref collapsed-iref))
absolute? (ctl/layout-absolute? item)
toggle-collapse
(fn [event]
(dom/stop-propagation event)
@ -71,7 +72,10 @@
[:div.element-list-body {:class (dom/classnames :selected selected?
:icon-layer (= (:type item) :icon))
:on-click select-shape}
[:& si/element-icon {:shape item}]
[:div.icon
(when absolute?
[:div.absolute i/position-absolute])
[:& si/element-icon {:shape item}]]
[:& layer-name {:shape item :disabled-double-click true}]
(when (and (not disable-collapse?) (:shapes item))