0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-13 16:21:57 -05:00

Merge pull request #4316 from penpot/alotor-bugfix-33

Bugfixing
This commit is contained in:
Alejandro 2024-03-22 16:44:09 +01:00 committed by GitHub
commit a9325754b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 2 deletions

View file

@ -326,7 +326,9 @@
reset-modifiers?
(and (gpo/axis-aligned? parent-bounds)
(gpo/axis-aligned? child-bounds)
(gpo/axis-aligned? transformed-parent-bounds))
(gpo/axis-aligned? transformed-parent-bounds)
(not= :scale constraints-h)
(not= :scale constraints-v))
modifiers
(if reset-modifiers?

View file

@ -311,6 +311,19 @@
[new-root-shape (map remap-frame-id new-shapes) updated-shapes]))
(defn remove-swap-keep-attrs
"Remove flex children properties except the fit-content for flex layouts. These are properties
that we don't have to propagate to copies but will be respected when swapping components"
[shape]
(let [layout-item-h-sizing (when (and (ctl/flex-layout? shape) (ctl/auto-width? shape)) :auto)
layout-item-v-sizing (when (and (ctl/flex-layout? shape) (ctl/auto-height? shape)) :auto)]
(-> shape
(d/without-keys ctk/swap-keep-attrs)
(cond-> (some? layout-item-h-sizing)
(assoc :layout-item-h-sizing layout-item-h-sizing))
(cond-> (some? layout-item-v-sizing)
(assoc :layout-item-v-sizing layout-item-v-sizing)))))
(defn make-component-instance
"Generate a new instance of the component inside the given container.
@ -331,7 +344,7 @@
(-> (get-shape component-page (:main-instance-id component))
(assoc :parent-id nil) ;; On v2 we force parent-id to nil in order to behave like v1
(assoc :frame-id uuid/zero)
(d/without-keys ctk/swap-keep-attrs))
(remove-swap-keep-attrs))
(get-shape component (:id component)))
orig-pos (gpt/point (:x component-shape) (:y component-shape))

View file

@ -108,6 +108,7 @@
word-wrap: break-word;
overflow-wrap: break-word;
hyphens: auto;
white-space: pre-wrap;
}
.replies {