0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-11 23:31:21 -05:00

Merge pull request #5060 from penpot/alotor-bugfixes

Bugfixes
This commit is contained in:
Andrey Antukh 2024-09-05 15:32:44 +02:00 committed by GitHub
commit 886c0c596f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 22 additions and 6 deletions

View file

@ -76,6 +76,10 @@
- Fix fill collapsed options [Taiga #8351](https://tree.taiga.io/project/penpot/issue/8351) - Fix fill collapsed options [Taiga #8351](https://tree.taiga.io/project/penpot/issue/8351)
- Fix scroll on color picker modal [Taiga #8353](https://tree.taiga.io/project/penpot/issue/8353) - Fix scroll on color picker modal [Taiga #8353](https://tree.taiga.io/project/penpot/issue/8353)
- Fix components are not dragged from the group to the assets tab [Taiga #8273](https://tree.taiga.io/project/penpot/issue/8273) - Fix components are not dragged from the group to the assets tab [Taiga #8273](https://tree.taiga.io/project/penpot/issue/8273)
- Fix problem with SVG import [Github #4888](https://github.com/penpot/penpot/issues/4888)
- Fix problem with overlay positions in viewer [Taiga #8464](https://tree.taiga.io/project/penpot/issue/8464)
- Fix layer panel overflowing [Taiga #8665](https://tree.taiga.io/project/penpot/issue/8665)
- Fix problem when creating a component instance from grid layout [Github #4881](https://github.com/penpot/penpot/issues/4881)
## 2.1.5 ## 2.1.5

View file

@ -1622,13 +1622,17 @@
(defn remap-grid-cells (defn remap-grid-cells
"Remaps the shapes ids inside the cells" "Remaps the shapes ids inside the cells"
[shape ids-map] [shape ids-map]
(let [do-remap-cells (let [remap-shape
(fn [id]
(get ids-map id id))
remap-cell
(fn [cell] (fn [cell]
(-> cell (-> cell
(update :shapes #(into [] (keep ids-map) %)))) (update :shapes #(into [] (keep remap-shape) %))))
shape shape
(-> shape (-> shape
(update :layout-grid-cells update-vals do-remap-cells))] (update :layout-grid-cells update-vals remap-cell))]
shape)) shape))
(defn merge-cells (defn merge-cells

View file

@ -73,7 +73,6 @@
(let [id (d/nilv id (uuid/next)) (let [id (d/nilv id (uuid/next))
page-id (:current-page-id state) page-id (:current-page-id state)
objects (wsh/lookup-page-objects state page-id) objects (wsh/lookup-page-objects state page-id)
frame-id (ctst/top-nested-frame objects position)
selected (if ignore-selection? #{} (wsh/lookup-selected state)) selected (if ignore-selection? #{} (wsh/lookup-selected state))
base (cfh/get-base-shape objects selected) base (cfh/get-base-shape objects selected)
@ -81,9 +80,16 @@
selected-frame? (and (= 1 (count selected)) selected-frame? (and (= 1 (count selected))
(= :frame (dm/get-in objects [selected-id :type]))) (= :frame (dm/get-in objects [selected-id :type])))
base-id (:parent-id base)
frame-id (if (or selected-frame? (empty? selected)
(not= :frame (dm/get-in objects [base-id :type])))
(ctst/top-nested-frame objects position)
base-id)
parent-id (if (or selected-frame? (empty? selected)) parent-id (if (or selected-frame? (empty? selected))
frame-id frame-id
(:parent-id base)) base-id)
[new-shape new-children] [new-shape new-children]
(csvg.shapes-builder/create-svg-shapes id svg-data position objects frame-id parent-id selected true) (csvg.shapes-builder/create-svg-shapes id svg-data position objects frame-id parent-id selected true)

View file

@ -427,7 +427,8 @@
(let [childs (mapv #(get objects %) (:shapes (unchecked-get props "shape"))) (let [childs (mapv #(get objects %) (:shapes (unchecked-get props "shape")))
props (obj/merge! #js {} props props (obj/merge! #js {} props
#js {:childs childs #js {:childs childs
:objects objects})] :objects objects
:all-objects all-objects})]
(when (not-empty childs) (when (not-empty childs)
[:> group-wrapper props]))))) [:> group-wrapper props])))))

View file

@ -55,6 +55,7 @@
overflow-x: hidden; overflow-x: hidden;
overflow-y: overlay; overflow-y: overlay;
scrollbar-gutter: stable; scrollbar-gutter: stable;
max-width: var(--width);
} }
.pages-list { .pages-list {