0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-01 09:31:26 -05:00

Merge remote-tracking branch 'origin/staging' into develop

This commit is contained in:
Alejandro Alonso 2022-09-07 06:32:29 +02:00
commit fb8543c4e4
3 changed files with 26 additions and 9 deletions

View file

@ -36,6 +36,7 @@
### :bug: Bugs fixed
- Fix default value of grow type in texts [Taiga #4034](https://tree.taiga.io/project/penpot/issue/4034)
- Fix error when moving nested frames outside [Taiga #4017](https://tree.taiga.io/project/penpot/issue/4017)
- Fix problem when hovering over nested frames [Taiga #4018](https://tree.taiga.io/project/penpot/issue/4018)
- Fix problem editing rotated texts [Taiga #4026](https://tree.taiga.io/project/penpot/issue/4026)
@ -48,6 +49,7 @@
- Fix path tools blocking elements underneath [#2050](https://github.com/penpot/penpot/issues/2050)
- Fix frame titles deforming when resize [#2207](https://github.com/penpot/penpot/issues/2207)
- Fix export simple line path [#3890](https://tree.taiga.io/project/penpot/issue/3890)
- Fix color-picker recent colors [Taiga #4013](https://tree.taiga.io/project/penpot/issue/4013)
## 1.15.1-beta

View file

@ -46,6 +46,9 @@
shape
(cond-> shape
(not click-draw?)
(-> (assoc :grow-type :fixed))
(and click-draw? (not text?))
(-> (assoc :width min-side :height min-side)
(assoc-in [:modifiers :displacement]

View file

@ -61,8 +61,17 @@
set-harmony-tab! (mf/use-fn #(reset! active-tab :harmony))
set-hsva-tab! (mf/use-fn #(reset! active-tab :hsva))
drag? (mf/use-state false)
handle-change-color
(mf/use-fn #(st/emit! (dc/update-colorpicker-color %)))
(mf/use-fn
(mf/deps @drag?)
(fn [color]
(let [recent-color (merge color)
recent-color (dc/materialize-color-components recent-color)]
(when (not @drag?)
(st/emit! (dwl/add-recent-color recent-color)))
(st/emit! (dc/update-colorpicker-color color)))))
handle-click-picker
(mf/use-fn
@ -96,14 +105,17 @@
on-activate-radial-gradient
(mf/use-fn #(st/emit! (dc/activate-colorpicker-gradient :radial-gradient)))
on-start-drag
(mf/use-fn
(fn []
(reset! drag? true)
(st/emit! (dwu/start-undo-transaction))))
on-finish-drag
(mf/use-fn
(mf/deps state)
(fn []
(let [color (dc/get-color-from-colorpicker-state state)]
(st/emit!
(dwl/add-recent-color color)
(dwu/commit-undo-transaction)))))]
(reset! drag? false)
(st/emit! (dwu/commit-undo-transaction))))]
;; Initialize colorpicker state
(mf/with-effect []
@ -194,21 +206,21 @@
{:color current-color
:disable-opacity disable-opacity
:on-change handle-change-color
:on-start-drag #(st/emit! (dwu/start-undo-transaction))
:on-start-drag on-start-drag
:on-finish-drag on-finish-drag}]
:harmony
[:& harmony-selector
{:color current-color
:disable-opacity disable-opacity
:on-change handle-change-color
:on-start-drag #(st/emit! (dwu/start-undo-transaction))
:on-start-drag on-start-drag
:on-finish-drag on-finish-drag}]
:hsva
[:& hsva-selector
{:color current-color
:disable-opacity disable-opacity
:on-change handle-change-color
:on-start-drag #(st/emit! (dwu/start-undo-transaction))
:on-start-drag on-start-drag
:on-finish-drag on-finish-drag}]
nil))