mirror of
https://github.com/penpot/penpot.git
synced 2025-02-15 03:28:25 -05:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
2ce36ce052
4 changed files with 34 additions and 28 deletions
|
@ -43,6 +43,7 @@
|
||||||
- Fix bad behaviour on hovering and click nested artboards [Taiga #4018](https://tree.taiga.io/project/penpot/issue/4018) and [Taiga #4269](https://tree.taiga.io/project/penpot/us/4269)
|
- Fix bad behaviour on hovering and click nested artboards [Taiga #4018](https://tree.taiga.io/project/penpot/issue/4018) and [Taiga #4269](https://tree.taiga.io/project/penpot/us/4269)
|
||||||
- Fix lang autodetect issue [Taiga #4277](https://tree.taiga.io/project/penpot/issue/4277)
|
- Fix lang autodetect issue [Taiga #4277](https://tree.taiga.io/project/penpot/issue/4277)
|
||||||
- Fix colorpicker does not close upon switching to Dashboard [Taiga #4408](https://tree.taiga.io/project/penpot/issue/4408)
|
- Fix colorpicker does not close upon switching to Dashboard [Taiga #4408](https://tree.taiga.io/project/penpot/issue/4408)
|
||||||
|
- Fix problem with auto-width/auto-height + lock-proportions
|
||||||
|
|
||||||
## 1.16.0-beta
|
## 1.16.0-beta
|
||||||
|
|
||||||
|
|
|
@ -443,14 +443,17 @@
|
||||||
(resize-modifiers (gpt/point scalex scaley) origin transform transform-inverse)))
|
(resize-modifiers (gpt/point scalex scaley) origin transform transform-inverse)))
|
||||||
|
|
||||||
(defn change-dimensions-modifiers
|
(defn change-dimensions-modifiers
|
||||||
[{:keys [transform transform-inverse] :as shape} attr value]
|
([shape attr value]
|
||||||
|
(change-dimensions-modifiers shape attr value nil))
|
||||||
|
|
||||||
|
([{:keys [transform transform-inverse] :as shape} attr value {:keys [ignore-lock?] :or {ignore-lock? false}}]
|
||||||
(us/assert map? shape)
|
(us/assert map? shape)
|
||||||
(us/assert #{:width :height} attr)
|
(us/assert #{:width :height} attr)
|
||||||
(us/assert number? value)
|
(us/assert number? value)
|
||||||
|
|
||||||
(let [{:keys [proportion proportion-lock]} shape
|
(let [{:keys [proportion proportion-lock]} shape
|
||||||
size (select-keys (:selrect shape) [:width :height])
|
size (select-keys (:selrect shape) [:width :height])
|
||||||
new-size (if-not proportion-lock
|
new-size (if-not (and (not ignore-lock?) proportion-lock)
|
||||||
(assoc size attr value)
|
(assoc size attr value)
|
||||||
(if (= attr :width)
|
(if (= attr :width)
|
||||||
(-> size
|
(-> size
|
||||||
|
@ -469,7 +472,7 @@
|
||||||
scalex (/ width sr-width)
|
scalex (/ width sr-width)
|
||||||
scaley (/ height sr-height)]
|
scaley (/ height sr-height)]
|
||||||
|
|
||||||
(resize-modifiers (gpt/point scalex scaley) origin transform transform-inverse)))
|
(resize-modifiers (gpt/point scalex scaley) origin transform transform-inverse))))
|
||||||
|
|
||||||
(defn change-orientation-modifiers
|
(defn change-orientation-modifiers
|
||||||
[shape orientation]
|
[shape orientation]
|
||||||
|
|
|
@ -331,13 +331,13 @@
|
||||||
shape
|
shape
|
||||||
(cond-> shape
|
(cond-> shape
|
||||||
(and (not-changed? shape-width new-width) (= grow-type :auto-width))
|
(and (not-changed? shape-width new-width) (= grow-type :auto-width))
|
||||||
(gsh/transform-shape (ctm/change-dimensions-modifiers shape :width new-width)))
|
(gsh/transform-shape (ctm/change-dimensions-modifiers shape :width new-width {:ignore-lock? true})))
|
||||||
|
|
||||||
shape
|
shape
|
||||||
(cond-> shape
|
(cond-> shape
|
||||||
(and (not-changed? shape-height new-height)
|
(and (not-changed? shape-height new-height)
|
||||||
(or (= grow-type :auto-height) (= grow-type :auto-width)))
|
(or (= grow-type :auto-height) (= grow-type :auto-width)))
|
||||||
(gsh/transform-shape (ctm/change-dimensions-modifiers shape :height new-height)))]
|
(gsh/transform-shape (ctm/change-dimensions-modifiers shape :height new-height {:ignore-lock? true})))]
|
||||||
|
|
||||||
shape))]
|
shape))]
|
||||||
|
|
||||||
|
@ -364,10 +364,10 @@
|
||||||
(let [new-shape
|
(let [new-shape
|
||||||
(cond-> shape
|
(cond-> shape
|
||||||
(some? width)
|
(some? width)
|
||||||
(gsh/transform-shape (ctm/change-dimensions-modifiers shape :width width))
|
(gsh/transform-shape (ctm/change-dimensions-modifiers shape :width width {:ignore-lock? true}))
|
||||||
|
|
||||||
(some? height)
|
(some? height)
|
||||||
(gsh/transform-shape (ctm/change-dimensions-modifiers shape :height height))
|
(gsh/transform-shape (ctm/change-dimensions-modifiers shape :height height {:ignore-lock? true}))
|
||||||
|
|
||||||
(some? position-data)
|
(some? position-data)
|
||||||
(assoc :position-data position-data))
|
(assoc :position-data position-data))
|
||||||
|
|
|
@ -643,8 +643,10 @@
|
||||||
(recursive-find-empty-parents parents))))
|
(recursive-find-empty-parents parents))))
|
||||||
|
|
||||||
empty-parents
|
empty-parents
|
||||||
;; Any parent whose children are moved should be deleted
|
;; Any empty parent whose children are moved to another frame should be deleted
|
||||||
(into (d/ordered-set) (find-all-empty-parents #{}))
|
(if (empty? moving-shapes)
|
||||||
|
#{}
|
||||||
|
(into (d/ordered-set) (find-all-empty-parents #{})))
|
||||||
|
|
||||||
changes
|
changes
|
||||||
(-> (pcb/empty-changes it page-id)
|
(-> (pcb/empty-changes it page-id)
|
||||||
|
|
Loading…
Add table
Reference in a new issue