0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 07:50:43 -05:00

Merge remote-tracking branch 'origin/staging' into develop

This commit is contained in:
Alejandro Alonso 2022-09-27 12:42:08 +02:00
commit 0bc24bb6eb
4 changed files with 40 additions and 16 deletions

View file

@ -68,6 +68,8 @@
- Fix error after user drags any layer in search functionality [Taiga #4161](https://tree.taiga.io/project/penpot/issue/4161)
- Fix font search works only with lowercase letters [Taiga #4140](https://tree.taiga.io/project/penpot/issue/4140)
- Fix Terms and Privacy links overlapping [Taiga #4137](https://tree.taiga.io/project/penpot/issue/4137)
- Fix Export bounding box mask [Taiga #950](https://tree.taiga.io/project/penpot/issue/950)
- Fix delete layers in bulk [Taiga #4160](https://tree.taiga.io/project/penpot/issue/4160)
## 1.15.3-beta

View file

@ -133,7 +133,7 @@
(-> (get-shape-filter-bounds shape)
(add-padding (calculate-padding shape true))))
bounds (if (cph/frame-shape? shape)
bounds (if (or (:masked-group? shape) (cph/frame-shape? shape))
[(calculate-base-bounds shape)]
(cph/reduce-objects
objects

View file

@ -141,6 +141,16 @@
(update-in state [:workspace-local :selected] disj id))))
(defn shift-select-shapes
([id objects]
(ptk/reify ::shift-select-shapes
ptk/UpdateEvent
(update [_ state]
(let [selection (-> state
wsh/lookup-selected
(conj id))]
(-> state
(assoc-in [:workspace-local :selected]
(cph/expand-region-selection objects selection)))))))
([id]
(ptk/reify ::shift-select-shapes
ptk/UpdateEvent

View file

@ -86,7 +86,7 @@
(when (seq (:touched shape)) " *")])))
(mf/defc layer-item
[{:keys [index item selected objects sortable?] :as props}]
[{:keys [index item selected objects sortable? filtered?] :as props}]
(let [id (:id item)
blocked? (:blocked item)
hidden? (:hidden item)
@ -137,13 +137,15 @@
select-shape
(mf/use-fn
(mf/deps id)
(mf/deps id filtered? objects)
(fn [event]
(dom/prevent-default event)
(reset! scroll-to-middle? false)
(cond
(kbd/shift? event)
(st/emit! (dw/shift-select-shapes id))
(if filtered?
(st/emit! (dw/shift-select-shapes id objects))
(st/emit! (dw/shift-select-shapes id)))
(kbd/mod? event)
(st/emit! (dw/select-shape id true))
@ -296,7 +298,7 @@
(mf/defc layers-tree
{::mf/wrap [#(mf/memo % =)
#(mf/throttle % 200)]}
[{:keys [objects] :as props}]
[{:keys [objects filtered?] :as props}]
(let [selected (mf/deref refs/selected-shapes)
selected (hooks/use-equal-memo selected)
root (get objects uuid/zero)]
@ -311,14 +313,16 @@
:index index
:objects objects
:key id
:sortable? true}]
:sortable? true
:filtered? filtered?}]
[:& layer-item
{:item obj
:selected selected
:index index
:objects objects
:key id
:sortable? true}])))]]))
:sortable? true
:filtered? filtered?}])))]]))
(mf/defc filters-tree
{::mf/wrap [#(mf/memo % =)
@ -336,7 +340,8 @@
:index index
:objects objects
:key id
:sortable? false}]))]))
:sortable? false
:filtered? true}]))]))
(defn calc-reparented-objects
@ -562,15 +567,22 @@
filter-component)
(when (some? filtered-objects)
[:div.tool-window-content {:ref on-render-container :key "filters"}
[:& filters-tree {:objects filtered-objects
:key (dm/str (:id page))}]
[:div.lazy {:ref lazy-load-ref
:key "lazy-load"
:style {:min-height 16}}]])
(if (some? filtered-objects)
[:*
[:div.tool-window-content {:ref on-render-container :key "filters"}
[:& filters-tree {:objects filtered-objects
:key (dm/str (:id page))}]
[:div.lazy {:ref lazy-load-ref
:key "lazy-load"
:style {:min-height 16}}]]
[:div.tool-window-content {:on-scroll on-scroll
:style {:display (when (some? filtered-objects) "none")}}
[:& layers-tree {:objects filtered-objects
:key (dm/str (:id page))
:filtered? true}]]]
[:div.tool-window-content {:on-scroll on-scroll
:style {:display (when (some? filtered-objects) "none")}}
[:& layers-tree {:objects objects
:key (dm/str (:id page))}]]]))
:key (dm/str (:id page))
:filtered? false}]])]))