mirror of
https://github.com/penpot/penpot.git
synced 2025-03-26 14:41:36 -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
|
@ -17,7 +17,7 @@ $width-settings-bar: 16rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullscreen .handoff-layout {
|
.fullscreen .handoff-layout:not(.force-visible) {
|
||||||
.viewer-header {
|
.viewer-header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullscreen .viewer-layout {
|
.fullscreen .viewer-layout:not(.force-visible) {
|
||||||
& .viewer-header {
|
& .viewer-header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
|
@ -35,9 +35,8 @@
|
||||||
(let [keys [(events/listen js/document EventType.CLICK on-click)
|
(let [keys [(events/listen js/document EventType.CLICK on-click)
|
||||||
(events/listen js/document EventType.CONTEXTMENU on-click)
|
(events/listen js/document EventType.CONTEXTMENU on-click)
|
||||||
(events/listen js/document EventType.KEYUP on-keyup)]]
|
(events/listen js/document EventType.KEYUP on-keyup)]]
|
||||||
#(do (on-close)
|
#(doseq [key keys]
|
||||||
(doseq [key keys]
|
(events/unlistenByKey key))))]
|
||||||
(events/unlistenByKey key)))))]
|
|
||||||
|
|
||||||
(mf/use-effect on-mount)
|
(mf/use-effect on-mount)
|
||||||
children))
|
children))
|
||||||
|
|
|
@ -171,6 +171,12 @@
|
||||||
:edition true
|
:edition true
|
||||||
:menu-open false)))]
|
: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
|
[:div.grid-item.project-th {:class (dom/classnames
|
||||||
:selected selected?)
|
:selected selected?)
|
||||||
:ref item-ref
|
:ref item-ref
|
||||||
|
|
|
@ -96,7 +96,8 @@
|
||||||
(mf/use-effect on-mount)
|
(mf/use-effect on-mount)
|
||||||
(hooks/use-shortcuts sc/shortcuts)
|
(hooks/use-shortcuts sc/shortcuts)
|
||||||
|
|
||||||
[:div.handoff-layout
|
[:div.handoff-layout {:class (dom/classnames :force-visible
|
||||||
|
(:show-thumbnails state))}
|
||||||
[:& header
|
[:& header
|
||||||
{:data data
|
{:data data
|
||||||
:state state
|
:state state
|
||||||
|
|
|
@ -242,7 +242,8 @@
|
||||||
(mf/use-effect on-mount)
|
(mf/use-effect on-mount)
|
||||||
(hooks/use-shortcuts sc/shortcuts)
|
(hooks/use-shortcuts sc/shortcuts)
|
||||||
|
|
||||||
[:div.viewer-layout
|
[:div.viewer-layout {:class (dom/classnames :force-visible
|
||||||
|
(:show-thumbnails state))}
|
||||||
[:& header
|
[:& header
|
||||||
{:data data
|
{:data data
|
||||||
:state state
|
:state state
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
[app.main.ui.components.dropdown :refer [dropdown]]
|
[app.main.ui.components.dropdown :refer [dropdown]]
|
||||||
[app.main.ui.components.fullscreen :as fs]
|
[app.main.ui.components.fullscreen :as fs]
|
||||||
[app.main.ui.icons :as i]
|
[app.main.ui.icons :as i]
|
||||||
[app.util.data :refer [classnames]]
|
|
||||||
[app.util.dom :as dom]
|
[app.util.dom :as dom]
|
||||||
[app.util.i18n :as i18n :refer [t]]
|
[app.util.i18n :as i18n :refer [t]]
|
||||||
[app.util.router :as rt]
|
[app.util.router :as rt]
|
||||||
|
|
Loading…
Add table
Reference in a new issue