0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-03 04:49:03 -05:00

Merge pull request #2698 from penpot/palba-interaction-bad-positioning-when-fixed

🐛 Fix bad element positioning on interaction with fixed scroll
This commit is contained in:
Alejandro 2022-12-28 11:02:23 +01:00 committed by GitHub
commit 13cfe56301
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 1 deletions

View file

@ -25,6 +25,7 @@
- Fix style for team invite in deutsch [Taiga #4614](https://tree.taiga.io/project/penpot/issue/4614)
- Fix problem with text edition in Safari [Taiga #4046](https://tree.taiga.io/project/penpot/issue/4046)
- Fix show outline with rounded corners on rects [Taiga #4053](https://tree.taiga.io/project/penpot/issue/4053)
- Fix bad element positioning on interaction with fixed scroll [Github #2660](https://github.com/penpot/penpot/issues/2660)
### :arrow_up: Deps updates

View file

@ -484,5 +484,18 @@
ids)))
st/state =))
(defn get-viewer-objects
([]
(let [route (deref route)
page-id (:page-id (:query-params route))]
(get-viewer-objects page-id)))
([page-id]
(l/derived
(fn [state]
(let [objects (wsh/lookup-viewer-objects state page-id)]
objects))
st/state =)))
(def colorpicker
(l/derived :colorpicker st/state))

View file

@ -58,7 +58,8 @@
:open-overlay
(let [dest-frame-id (:destination interaction)
dest-frame (get objects dest-frame-id)
viewer-objects (deref (refs/get-viewer-objects))
dest-frame (get viewer-objects dest-frame-id)
relative-to-id (if (= :manual (:overlay-pos-type interaction))
(:id shape) ;; manual interactions are allways from "self"
(:position-relative-to interaction))