diff --git a/common/src/app/common/geom/shapes/transforms.cljc b/common/src/app/common/geom/shapes/transforms.cljc index c3035df27..cbff62e3a 100644 --- a/common/src/app/common/geom/shapes/transforms.cljc +++ b/common/src/app/common/geom/shapes/transforms.cljc @@ -238,7 +238,15 @@ points-transform-mtx (gmt/translate-matrix center))) - transform-inverse (when transform (gmt/inverse transform))] + transform-inverse (when transform (gmt/inverse transform)) + + ;; There is a rounding error when the matrix returned have float point values + ;; when the matrix is unit we return a "pure" matrix so we don't accumulate + ;; rounding problems + [transform transform-inverse] + (if (gmt/unit? transform) + [(gmt/matrix) (gmt/matrix)] + [transform transform-inverse])] [sr transform transform-inverse])) diff --git a/frontend/src/app/main/data/workspace/modifiers.cljs b/frontend/src/app/main/data/workspace/modifiers.cljs index 717dfa7fe..de4782c4a 100644 --- a/frontend/src/app/main/data/workspace/modifiers.cljs +++ b/frontend/src/app/main/data/workspace/modifiers.cljs @@ -219,7 +219,7 @@ result (let [[id text-modifier] (first modifiers)] (recur (rest modifiers) - (update result id apply-text-modifier text-modifier)))))) + (d/update-when result id apply-text-modifier text-modifier)))))) #_(defn apply-path-modifiers [objects path-modifiers]