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

🐛 Fix text content sync and touched detection in shape displacement

This commit is contained in:
Andrés Moya 2023-01-04 16:32:52 +01:00
parent 6f72ea0530
commit 5e1cabc857
3 changed files with 9 additions and 2 deletions

View file

@ -37,6 +37,7 @@
- Fix pressing the enter key gives you an internal error [Github 2675](https://github.com/penpot/penpot/issues/2675) [Github 2577](https://github.com/penpot/penpot/issues/2577) - Fix pressing the enter key gives you an internal error [Github 2675](https://github.com/penpot/penpot/issues/2675) [Github 2577](https://github.com/penpot/penpot/issues/2577)
- Fix confirm group name with enter doesn't work in assets modal [Taiga #4506](https://tree.taiga.io/project/penpot/issue/4506) - Fix confirm group name with enter doesn't work in assets modal [Taiga #4506](https://tree.taiga.io/project/penpot/issue/4506)
- Fix group/ungroup shapes inside a component [Taiga #4052](https://tree.taiga.io/project/penpot/issue/4052) - Fix group/ungroup shapes inside a component [Taiga #4052](https://tree.taiga.io/project/penpot/issue/4052)
- Fix wrong update of text in components [Taiga #4646](https://tree.taiga.io/project/penpot/issue/4646)
## 1.16.2-beta ## 1.16.2-beta

View file

@ -13,6 +13,11 @@
(def default-color clr/gray-20) (def default-color clr/gray-20)
(def root uuid/zero) (def root uuid/zero)
;; Attributes that may be synced in components, and the group they belong to.
;; When one attribute is modified in a shape inside a component, the corresponding
;; group is marked as :touched. Then, if the shape is synced with the remote shape
;; in the main component, none of the attributes of the same group is changed.
(def component-sync-attrs (def component-sync-attrs
{:name :name-group {:name :name-group
:fills :fill-group :fills :fill-group
@ -23,6 +28,7 @@
:fill-color-ref-id :fill-group :fill-color-ref-id :fill-group
:hide-fill-on-export :fill-group :hide-fill-on-export :fill-group
:content :content-group :content :content-group
:position-data :content-group
:hidden :visibility-group :hidden :visibility-group
:blocked :modifiable-group :blocked :modifiable-group
:grow-type :text-font-group :grow-type :text-font-group
@ -63,7 +69,6 @@
:rotation :geometry-group :rotation :geometry-group
:transform :geometry-group :transform :geometry-group
:transform-inverse :geometry-group :transform-inverse :geometry-group
:position-data :geometry-group
:opacity :layer-effects-group :opacity :layer-effects-group
:blend-mode :layer-effects-group :blend-mode :layer-effects-group
:shadow :shadow-group :shadow :shadow-group

View file

@ -8,6 +8,7 @@
"Events related with shapes transformations" "Events related with shapes transformations"
(:require (:require
[app.common.data :as d] [app.common.data :as d]
[app.common.data.macros :as dm]
[app.common.geom.point :as gpt] [app.common.geom.point :as gpt]
[app.common.geom.shapes :as gsh] [app.common.geom.shapes :as gsh]
[app.common.math :as mth] [app.common.math :as mth]
@ -100,7 +101,7 @@
(let [children (map (d/getf objects) (:shapes shape)) (let [children (map (d/getf objects) (:shapes shape))
shape-id (:id shape) shape-id (:id shape)
transformed-shape (gsh/transform-shape shape (get modif-tree shape-id)) transformed-shape (gsh/transform-shape shape (dm/get-in modif-tree [shape-id :modifiers]))
[root transformed-root ignore-geometry?] [root transformed-root ignore-geometry?]
(check-delta shape root transformed-shape transformed-root objects modif-tree) (check-delta shape root transformed-shape transformed-root objects modif-tree)