mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 23:26:39 +02:00
🐛 Fix workspace context menu in small screens
This commit is contained in:
parent
04a69c2a2c
commit
fbe09e6b5a
5 changed files with 8 additions and 91 deletions
|
@ -652,11 +652,10 @@
|
|||
|
||||
[:& dropdown {:show (boolean mdata)
|
||||
:on-close #(st/emit! dw/hide-context-menu)}
|
||||
[:ul
|
||||
{:class (stl/css :workspace-context-menu)
|
||||
:ref dropdown-ref
|
||||
:style {:top top :left left}
|
||||
:on-context-menu prevent-default}
|
||||
[:ul {:class (stl/css :workspace-context-menu)
|
||||
:ref dropdown-ref
|
||||
:style {:top top :left left}
|
||||
:on-context-menu prevent-default}
|
||||
|
||||
(case (:kind mdata)
|
||||
:shape [:& shape-context-menu {:mdata mdata}]
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
border: $s-2 solid var(--panel-border-color);
|
||||
background-color: var(--menu-background-color);
|
||||
z-index: $z-index-4;
|
||||
max-height: 100vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.separator {
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
shared-libs (mf/deref refs/workspace-libraries)]
|
||||
[:& dropdown {:show show-menu?
|
||||
:on-close close-menu}
|
||||
[:ul {:class (stl/css :workspace-context-menu)}
|
||||
[:ul {:class (stl/css :text-context-menu)}
|
||||
(for [[idx cur-library] (map-indexed vector (vals shared-libs))]
|
||||
(let [typographies (-> cur-library (get-in [:data :typographies]) vals)]
|
||||
[:li
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
@import "refactor/common-refactor.scss";
|
||||
|
||||
.workspace-context-menu {
|
||||
.text-context-menu {
|
||||
position: absolute;
|
||||
left: auto;
|
||||
bottom: var(--height);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue