mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 00:10:11 -05:00
Merge pull request #4662 from penpot/superalex-locking-degrees-on-path-edition
✨ Add locking degrees increment (hold shift) on path edition
This commit is contained in:
commit
ee2ee326f3
3 changed files with 11 additions and 2 deletions
|
@ -9,7 +9,8 @@
|
|||
### :heart: Community contributions (Thank you!)
|
||||
|
||||
### :sparkles: New features
|
||||
- Improve auth process [Taiga #Change Auth Process](https://tree.taiga.io/project/penpot/us/7094)
|
||||
- Improve auth process [Taiga #7094](https://tree.taiga.io/project/penpot/us/7094)
|
||||
- Add locking degrees increment (hold shift) on path edition [Taiga #7761](https://tree.taiga.io/project/penpot/issue/7761)
|
||||
|
||||
### :bug: Bugs fixed
|
||||
|
||||
|
|
|
@ -114,6 +114,9 @@
|
|||
(update [_ state]
|
||||
(let [id (st/get-path-id state)
|
||||
content (st/get-path state :content)
|
||||
to-point (cond-> to-point
|
||||
(:shift? to-point) (helpers/position-fixed-angle from-point))
|
||||
|
||||
delta (gpt/subtract to-point from-point)
|
||||
|
||||
modifiers-reducer (partial modify-content-point content delta)
|
||||
|
|
|
@ -101,7 +101,12 @@
|
|||
(->> ms/mouse-position
|
||||
(rx/map to-pixel-snap)
|
||||
(rx/with-latest-from (snap-toggled-stream))
|
||||
(rx/map check-path-snap))))
|
||||
(rx/map check-path-snap)
|
||||
(rx/with-latest-from
|
||||
(fn [position shift? alt?]
|
||||
(assoc position :shift? shift? :alt? alt?))
|
||||
ms/mouse-position-shift
|
||||
ms/mouse-position-alt))))
|
||||
|
||||
(defn get-angle [node handler opposite]
|
||||
(when (and (some? node) (some? handler) (some? opposite))
|
||||
|
|
Loading…
Reference in a new issue