0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-16 00:41:25 -05:00

🐛 Fix moving frame-guides outside frames

This commit is contained in:
alonso.torres 2022-07-14 13:17:52 +02:00
parent fdbcf977f5
commit 8e9ab32a9f
2 changed files with 9 additions and 5 deletions

View file

@ -34,6 +34,7 @@
- Fix problem with group coordinates [#2008](https://github.com/penpot/penpot/issues/2008)
- Fix problem with line-height and texts [Taiga #3578](https://tree.taiga.io/project/penpot/issue/3578)
- Fix moving frame-guides outside frames [Taiga #3839](https://tree.taiga.io/project/penpot/issue/3839)
### :arrow_up: Deps updates

View file

@ -284,13 +284,16 @@
pos (+ (or (:new-position @state) (:position guide)) (get move-vec axis))
guide-width (/ guide-width zoom)
guide-pill-corner-radius (/ guide-pill-corner-radius zoom)]
guide-pill-corner-radius (/ guide-pill-corner-radius zoom)
frame-guide-outside?
(and (some? frame)
(not (is-guide-inside-frame? (assoc guide :position pos) frame)))]
(when (or (nil? frame)
(and (is-guide-inside-frame? (assoc guide :position pos) frame)
(cph/root-frame? frame)
(and (cph/root-frame? frame)
(not (cph/rotated-frame? frame))))
[:g.guide-area
[:g.guide-area {:opacity (when frame-guide-outside? 0)}
(when-not disabled-guides?
(let [{:keys [x y width height]} (guide-area-axis pos vbox zoom frame axis)]
[:rect {:x x
@ -298,7 +301,7 @@
:width width
:height height
:style {:fill "none"
:pointer-events "fill"
:pointer-events (if frame-guide-outside? "none" "fill")
:cursor (if (= axis :x) (cur/resize-ew 0) (cur/resize-ns 0))}
:on-pointer-enter on-pointer-enter
:on-pointer-leave on-pointer-leave