mirror of
https://github.com/penpot/penpot.git
synced 2025-02-02 12:28:54 -05:00
Merge pull request #3050 from penpot/alotor-fixes-layout
Alotor fixes layout
This commit is contained in:
commit
b32e0f458c
2 changed files with 11 additions and 4 deletions
|
@ -309,12 +309,12 @@
|
||||||
(-> (or modifiers (empty))
|
(-> (or modifiers (empty))
|
||||||
(update :structure-child conj (scale-content-op value))))
|
(update :structure-child conj (scale-content-op value))))
|
||||||
|
|
||||||
(defn change-property
|
(defn change-recursive-property
|
||||||
[modifiers property value]
|
[modifiers property value]
|
||||||
(-> (or modifiers (empty))
|
(-> (or modifiers (empty))
|
||||||
(update :structure-child conj (change-property-op property value))))
|
(update :structure-child conj (change-property-op property value))))
|
||||||
|
|
||||||
(defn change-parent-property
|
(defn change-property
|
||||||
[modifiers property value]
|
[modifiers property value]
|
||||||
(-> (or modifiers (empty))
|
(-> (or modifiers (empty))
|
||||||
(update :structure-parent conj (change-property-op property value))))
|
(update :structure-parent conj (change-property-op property value))))
|
||||||
|
|
|
@ -184,10 +184,10 @@
|
||||||
(ctm/resize scalev resize-origin shape-transform shape-transform-inverse)
|
(ctm/resize scalev resize-origin shape-transform shape-transform-inverse)
|
||||||
|
|
||||||
(cond-> set-fix-width?
|
(cond-> set-fix-width?
|
||||||
(ctm/change-parent-property :layout-item-h-sizing :fix))
|
(ctm/change-property :layout-item-h-sizing :fix))
|
||||||
|
|
||||||
(cond-> set-fix-height?
|
(cond-> set-fix-height?
|
||||||
(ctm/change-parent-property :layout-item-v-sizing :fix))
|
(ctm/change-property :layout-item-v-sizing :fix))
|
||||||
|
|
||||||
(cond-> scale-text
|
(cond-> scale-text
|
||||||
(ctm/scale-content (:x scalev))))
|
(ctm/scale-content (:x scalev))))
|
||||||
|
@ -739,6 +739,13 @@
|
||||||
#{}
|
#{}
|
||||||
(into (d/ordered-set) (find-all-empty-parents #{})))
|
(into (d/ordered-set) (find-all-empty-parents #{})))
|
||||||
|
|
||||||
|
;; Not move absolute shapes that won't change parent
|
||||||
|
moving-shapes
|
||||||
|
(->> moving-shapes
|
||||||
|
(remove (fn [shape]
|
||||||
|
(and (ctl/layout-absolute? shape)
|
||||||
|
(= frame-id (:parent-id shape))))))
|
||||||
|
|
||||||
changes
|
changes
|
||||||
(-> (pcb/empty-changes it page-id)
|
(-> (pcb/empty-changes it page-id)
|
||||||
(pcb/with-objects objects)
|
(pcb/with-objects objects)
|
||||||
|
|
Loading…
Add table
Reference in a new issue