mirror of
https://github.com/penpot/penpot.git
synced 2025-03-19 19:21:23 -05:00
🐛 Fix closing of thumbnails panel in view mode
This commit is contained in:
parent
b534f5b736
commit
1773de88f5
7 changed files with 14 additions and 8 deletions
frontend
resources/styles/main/layouts
src/app/main/ui
|
@ -17,7 +17,7 @@ $width-settings-bar: 16rem;
|
|||
}
|
||||
}
|
||||
|
||||
.fullscreen .handoff-layout {
|
||||
.fullscreen .handoff-layout:not(.force-visible) {
|
||||
.viewer-header {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.fullscreen .viewer-layout {
|
||||
.fullscreen .viewer-layout:not(.force-visible) {
|
||||
& .viewer-header {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
|
|
|
@ -35,9 +35,8 @@
|
|||
(let [keys [(events/listen js/document EventType.CLICK on-click)
|
||||
(events/listen js/document EventType.CONTEXTMENU on-click)
|
||||
(events/listen js/document EventType.KEYUP on-keyup)]]
|
||||
#(do (on-close)
|
||||
(doseq [key keys]
|
||||
(events/unlistenByKey key)))))]
|
||||
#(doseq [key keys]
|
||||
(events/unlistenByKey key))))]
|
||||
|
||||
(mf/use-effect on-mount)
|
||||
children))
|
||||
|
|
|
@ -171,6 +171,12 @@
|
|||
:edition true
|
||||
:menu-open false)))]
|
||||
|
||||
(mf/use-effect
|
||||
(mf/deps selected? local)
|
||||
(fn []
|
||||
(when (and (not selected?) (:menu-open @local))
|
||||
(swap! local assoc :menu-open false))))
|
||||
|
||||
[:div.grid-item.project-th {:class (dom/classnames
|
||||
:selected selected?)
|
||||
:ref item-ref
|
||||
|
|
|
@ -96,7 +96,8 @@
|
|||
(mf/use-effect on-mount)
|
||||
(hooks/use-shortcuts sc/shortcuts)
|
||||
|
||||
[:div.handoff-layout
|
||||
[:div.handoff-layout {:class (dom/classnames :force-visible
|
||||
(:show-thumbnails state))}
|
||||
[:& header
|
||||
{:data data
|
||||
:state state
|
||||
|
|
|
@ -242,7 +242,8 @@
|
|||
(mf/use-effect on-mount)
|
||||
(hooks/use-shortcuts sc/shortcuts)
|
||||
|
||||
[:div.viewer-layout
|
||||
[:div.viewer-layout {:class (dom/classnames :force-visible
|
||||
(:show-thumbnails state))}
|
||||
[:& header
|
||||
{:data data
|
||||
:state state
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
[app.main.ui.components.dropdown :refer [dropdown]]
|
||||
[app.main.ui.components.fullscreen :as fs]
|
||||
[app.main.ui.icons :as i]
|
||||
[app.util.data :refer [classnames]]
|
||||
[app.util.dom :as dom]
|
||||
[app.util.i18n :as i18n :refer [t]]
|
||||
[app.util.router :as rt]
|
||||
|
|
Loading…
Add table
Reference in a new issue