mirror of
https://github.com/penpot/penpot.git
synced 2025-06-04 07:01:39 +02:00
🐛 Fix moving frame-guides outside frames
This commit is contained in:
parent
fdbcf977f5
commit
8e9ab32a9f
2 changed files with 9 additions and 5 deletions
|
@ -34,6 +34,7 @@
|
||||||
|
|
||||||
- Fix problem with group coordinates [#2008](https://github.com/penpot/penpot/issues/2008)
|
- 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 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
|
### :arrow_up: Deps updates
|
||||||
|
|
|
@ -284,13 +284,16 @@
|
||||||
|
|
||||||
pos (+ (or (:new-position @state) (:position guide)) (get move-vec axis))
|
pos (+ (or (:new-position @state) (:position guide)) (get move-vec axis))
|
||||||
guide-width (/ guide-width zoom)
|
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)
|
(when (or (nil? frame)
|
||||||
(and (is-guide-inside-frame? (assoc guide :position pos) frame)
|
(and (cph/root-frame? frame)
|
||||||
(cph/root-frame? frame)
|
|
||||||
(not (cph/rotated-frame? frame))))
|
(not (cph/rotated-frame? frame))))
|
||||||
[:g.guide-area
|
[:g.guide-area {:opacity (when frame-guide-outside? 0)}
|
||||||
(when-not disabled-guides?
|
(when-not disabled-guides?
|
||||||
(let [{:keys [x y width height]} (guide-area-axis pos vbox zoom frame axis)]
|
(let [{:keys [x y width height]} (guide-area-axis pos vbox zoom frame axis)]
|
||||||
[:rect {:x x
|
[:rect {:x x
|
||||||
|
@ -298,7 +301,7 @@
|
||||||
:width width
|
:width width
|
||||||
:height height
|
:height height
|
||||||
:style {:fill "none"
|
: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))}
|
:cursor (if (= axis :x) (cur/resize-ew 0) (cur/resize-ns 0))}
|
||||||
:on-pointer-enter on-pointer-enter
|
:on-pointer-enter on-pointer-enter
|
||||||
:on-pointer-leave on-pointer-leave
|
:on-pointer-leave on-pointer-leave
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue