From 36d3d94ec92a626cae5b73c24e82241dd2940d9c Mon Sep 17 00:00:00 2001 From: Eva Marco Date: Tue, 29 Jul 2025 14:32:06 +0200 Subject: [PATCH] :bug: Fix X & Y position do not sincronize with tokens (#7004) --- CHANGES.md | 1 + common/src/app/common/types/token.cljc | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index c993f75721..dcb4ea20b0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -52,6 +52,7 @@ - Fix change from gradient to solid color [Taiga #11648](https://tree.taiga.io/project/penpot/issue/11648) - Fix the context menu always closes after any action [Taiga #11624](https://tree.taiga.io/project/penpot/issue/11624) - Fix font selector highlight inconsistency when using keyboard navigation [Taiga #11668](https://tree.taiga.io/project/penpot/issue/11668) +- Fix X & Y position do not sincronize with tokens [Taiga #11617](https://tree.taiga.io/project/penpot/issue/11617) ## 2.8.1 (Unreleased) diff --git a/common/src/app/common/types/token.cljc b/common/src/app/common/types/token.cljc index afd7279808..57b3bd3b08 100644 --- a/common/src/app/common/types/token.cljc +++ b/common/src/app/common/types/token.cljc @@ -128,6 +128,15 @@ (def dimensions-keys (schema-keys schema:dimensions)) +(def ^:private schema:axis + [:map + [:x {:optional true} token-name-ref] + [:y {:optional true} token-name-ref]]) + +(def axis-keys (schema-keys schema:axis)) + + + (def ^:private schema:rotation [:map [:rotation {:optional true} token-name-ref]]) @@ -165,6 +174,7 @@ opacity-keys spacing-keys dimensions-keys + axis-keys rotation-keys typography-keys number-keys)) @@ -216,7 +226,8 @@ (opacity-keys shape-attr) #{shape-attr} (spacing-keys shape-attr) #{shape-attr} (rotation-keys shape-attr) #{shape-attr} - (number-keys shape-attr) #{shape-attr}))) + (number-keys shape-attr) #{shape-attr} + (axis-keys shape-attr) #{shape-attr}))) (defn token-attr->shape-attr [token-attr]