mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
🐛 Fix overlay position when it has shadow or blur
This commit is contained in:
parent
e563611c05
commit
65598aa724
10 changed files with 242 additions and 102 deletions
|
@ -542,13 +542,14 @@
|
|||
;; --- Overlays
|
||||
|
||||
(defn- open-overlay*
|
||||
[state frame position close-click-outside background-overlay animation]
|
||||
[state frame position snap-to close-click-outside background-overlay animation]
|
||||
(cond-> state
|
||||
:always
|
||||
(update :viewer-overlays conj
|
||||
{:frame frame
|
||||
:id (:id frame)
|
||||
:position position
|
||||
:snap-to snap-to
|
||||
:close-click-outside close-click-outside
|
||||
:background-overlay background-overlay
|
||||
:animation animation})
|
||||
|
@ -571,7 +572,7 @@
|
|||
:animation animation})))
|
||||
|
||||
(defn open-overlay
|
||||
[frame-id position close-click-outside background-overlay animation]
|
||||
[frame-id position snap-to close-click-outside background-overlay animation]
|
||||
(dm/assert! (uuid? frame-id))
|
||||
(dm/assert! (gpt/point? position))
|
||||
(dm/assert! (or (nil? close-click-outside)
|
||||
|
@ -593,6 +594,7 @@
|
|||
(open-overlay* state
|
||||
frame
|
||||
position
|
||||
snap-to
|
||||
close-click-outside
|
||||
background-overlay
|
||||
animation)
|
||||
|
@ -600,7 +602,7 @@
|
|||
|
||||
|
||||
(defn toggle-overlay
|
||||
[frame-id position close-click-outside background-overlay animation]
|
||||
[frame-id position snap-to close-click-outside background-overlay animation]
|
||||
(dm/assert! (uuid? frame-id))
|
||||
(dm/assert! (gpt/point? position))
|
||||
(dm/assert! (or (nil? close-click-outside)
|
||||
|
@ -623,6 +625,7 @@
|
|||
(open-overlay* state
|
||||
frame
|
||||
position
|
||||
snap-to
|
||||
close-click-outside
|
||||
background-overlay
|
||||
animation)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue