mirror of
https://github.com/penpot/penpot.git
synced 2025-05-26 05:56:11 +02:00
Merge remote-tracking branch 'origin/main' into staging
This commit is contained in:
commit
0612e71166
5 changed files with 37 additions and 13 deletions
|
@ -90,8 +90,8 @@
|
|||
path)))
|
||||
|
||||
(defn- points->components [shape content]
|
||||
(let [transform (:transform shape)
|
||||
transform-inverse (:transform-inverse shape)
|
||||
(let [transform (:transform shape (gmt/matrix))
|
||||
transform-inverse (:transform-inverse shape (gmt/matrix))
|
||||
center (gsh/center-shape shape)
|
||||
base-content (gsh/transform-content
|
||||
content
|
||||
|
|
|
@ -36,7 +36,9 @@
|
|||
(mf/defc radial-gradient [{:keys [id gradient shape]}]
|
||||
(let [{:keys [x y width height]} (:selrect shape)
|
||||
center (gsh/center-shape shape)
|
||||
transform (when (= :path (:type shape)) (gsh/transform-matrix shape))]
|
||||
transform (if (= :path (:type shape))
|
||||
(gsh/transform-matrix shape)
|
||||
(gmt/matrix))]
|
||||
(let [[x y] (if (= (:type shape) :frame) [0 0] [x y])
|
||||
translate-vec (gpt/point (+ x (* width (:start-x gradient)))
|
||||
(+ y (* height (:start-y gradient))))
|
||||
|
|
|
@ -220,6 +220,11 @@
|
|||
(fn [event]
|
||||
(dwt/editor-select-all! editor))
|
||||
|
||||
on-composition-start
|
||||
(mf/use-callback
|
||||
(fn [event]
|
||||
(.insertText slate/Editor editor "")))
|
||||
|
||||
on-change
|
||||
(mf/use-callback
|
||||
(fn [val]
|
||||
|
@ -261,7 +266,9 @@
|
|||
(dom/stop-propagation event)
|
||||
;; WARN: monky patch
|
||||
(obj/set! slate/Transforms "deselect" (constantly nil)))
|
||||
:placeholder (when (= :fixed grow-type) "Type some text here...")}]]]))
|
||||
:on-composition-start on-composition-start
|
||||
;; :placeholder (when (= :fixed grow-type) "Type some text here...")
|
||||
}]]]))
|
||||
|
||||
(mf/defc text-shape-edit
|
||||
{::mf/wrap [mf/memo]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue