mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 10:38:13 -05:00
🐛 Fix problems with nested boards
This commit is contained in:
parent
b57ddf9dca
commit
f89ccac567
3 changed files with 12 additions and 7 deletions
|
@ -71,7 +71,7 @@
|
||||||
:stroke-opacity 1}]}
|
:stroke-opacity 1}]}
|
||||||
|
|
||||||
{:type :frame
|
{:type :frame
|
||||||
:name "Artboard-1"
|
:name "Board-1"
|
||||||
:fills [{:fill-color clr/white
|
:fills [{:fill-color clr/white
|
||||||
:fill-opacity 1}]
|
:fill-opacity 1}]
|
||||||
:strokes []
|
:strokes []
|
||||||
|
|
|
@ -870,13 +870,19 @@
|
||||||
objects (wsh/lookup-page-objects state page-id)
|
objects (wsh/lookup-page-objects state page-id)
|
||||||
frame-id (cph/frame-id-by-position objects position)
|
frame-id (cph/frame-id-by-position objects position)
|
||||||
|
|
||||||
moving-shapes (->> ids
|
moving-shapes
|
||||||
(cph/clean-loops objects)
|
(->> ids
|
||||||
(keep #(get objects %))
|
(cph/clean-loops objects)
|
||||||
(remove (partial check-frame-move? frame-id objects position)))
|
(keep #(get objects %))
|
||||||
|
(remove (partial check-frame-move? frame-id objects position)))
|
||||||
|
|
||||||
|
moving-frames
|
||||||
|
(->> ids
|
||||||
|
(filter #(cph/frame-shape? objects %)))
|
||||||
|
|
||||||
changes (-> (pcb/empty-changes it page-id)
|
changes (-> (pcb/empty-changes it page-id)
|
||||||
(pcb/with-objects objects)
|
(pcb/with-objects objects)
|
||||||
|
(pcb/update-shapes moving-frames (fn [shape] (assoc shape :hide-in-viewer true)))
|
||||||
(pcb/change-parent frame-id moving-shapes))]
|
(pcb/change-parent frame-id moving-shapes))]
|
||||||
|
|
||||||
(when-not (empty? changes)
|
(when-not (empty? changes)
|
||||||
|
|
|
@ -140,8 +140,7 @@
|
||||||
text-pos-x (if (:use-for-thumbnail? frame) 15 0)]
|
text-pos-x (if (:use-for-thumbnail? frame) 15 0)]
|
||||||
|
|
||||||
(when (not (:hidden frame))
|
(when (not (:hidden frame))
|
||||||
[:g {:id (dm/str "frame-title-" (:id frame))
|
[:g {:id (dm/str "frame-title-" (:id frame))}
|
||||||
}
|
|
||||||
(when (:use-for-thumbnail? frame)
|
(when (:use-for-thumbnail? frame)
|
||||||
[:g {:transform (dm/str frame-transform " " (text-transform label-pos zoom))}
|
[:g {:transform (dm/str frame-transform " " (text-transform label-pos zoom))}
|
||||||
[:svg {:x 0
|
[:svg {:x 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue