🐛 Fixed alignment of layers with children

This commit is contained in:
Andrés Moya
2022-02-21 13:17:46 +01:00
committed by Andrey Antukh
parent 7cf27ac86d
commit 46bfb2aacd
2 changed files with 2 additions and 5 deletions

View File

@@ -6,7 +6,6 @@
(ns app.common.geom.align
(:require
[app.common.data :as d]
[app.common.geom.shapes :as gsh]
[app.common.pages.helpers :refer [get-children]]
[clojure.spec.alpha :as s]))
@@ -20,8 +19,7 @@
(defn- recursive-move
"Move the shape and all its recursive children."
[shape dpoint objects]
(->> (get-children (:id shape) objects)
(map (d/getf objects))
(->> (get-children objects (:id shape))
(cons shape)
(map #(gsh/move % dpoint))))