mirror of
https://github.com/penpot/penpot.git
synced 2025-01-23 06:58:58 -05:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
0bc24bb6eb
4 changed files with 40 additions and 16 deletions
|
@ -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 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 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 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
|
## 1.15.3-beta
|
||||||
|
|
|
@ -133,7 +133,7 @@
|
||||||
(-> (get-shape-filter-bounds shape)
|
(-> (get-shape-filter-bounds shape)
|
||||||
(add-padding (calculate-padding shape true))))
|
(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)]
|
[(calculate-base-bounds shape)]
|
||||||
(cph/reduce-objects
|
(cph/reduce-objects
|
||||||
objects
|
objects
|
||||||
|
|
|
@ -141,6 +141,16 @@
|
||||||
(update-in state [:workspace-local :selected] disj id))))
|
(update-in state [:workspace-local :selected] disj id))))
|
||||||
|
|
||||||
(defn shift-select-shapes
|
(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]
|
([id]
|
||||||
(ptk/reify ::shift-select-shapes
|
(ptk/reify ::shift-select-shapes
|
||||||
ptk/UpdateEvent
|
ptk/UpdateEvent
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
(when (seq (:touched shape)) " *")])))
|
(when (seq (:touched shape)) " *")])))
|
||||||
|
|
||||||
(mf/defc layer-item
|
(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)
|
(let [id (:id item)
|
||||||
blocked? (:blocked item)
|
blocked? (:blocked item)
|
||||||
hidden? (:hidden item)
|
hidden? (:hidden item)
|
||||||
|
@ -137,13 +137,15 @@
|
||||||
|
|
||||||
select-shape
|
select-shape
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(mf/deps id)
|
(mf/deps id filtered? objects)
|
||||||
(fn [event]
|
(fn [event]
|
||||||
(dom/prevent-default event)
|
(dom/prevent-default event)
|
||||||
(reset! scroll-to-middle? false)
|
(reset! scroll-to-middle? false)
|
||||||
(cond
|
(cond
|
||||||
(kbd/shift? event)
|
(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)
|
(kbd/mod? event)
|
||||||
(st/emit! (dw/select-shape id true))
|
(st/emit! (dw/select-shape id true))
|
||||||
|
@ -296,7 +298,7 @@
|
||||||
(mf/defc layers-tree
|
(mf/defc layers-tree
|
||||||
{::mf/wrap [#(mf/memo % =)
|
{::mf/wrap [#(mf/memo % =)
|
||||||
#(mf/throttle % 200)]}
|
#(mf/throttle % 200)]}
|
||||||
[{:keys [objects] :as props}]
|
[{:keys [objects filtered?] :as props}]
|
||||||
(let [selected (mf/deref refs/selected-shapes)
|
(let [selected (mf/deref refs/selected-shapes)
|
||||||
selected (hooks/use-equal-memo selected)
|
selected (hooks/use-equal-memo selected)
|
||||||
root (get objects uuid/zero)]
|
root (get objects uuid/zero)]
|
||||||
|
@ -311,14 +313,16 @@
|
||||||
:index index
|
:index index
|
||||||
:objects objects
|
:objects objects
|
||||||
:key id
|
:key id
|
||||||
:sortable? true}]
|
:sortable? true
|
||||||
|
:filtered? filtered?}]
|
||||||
[:& layer-item
|
[:& layer-item
|
||||||
{:item obj
|
{:item obj
|
||||||
:selected selected
|
:selected selected
|
||||||
:index index
|
:index index
|
||||||
:objects objects
|
:objects objects
|
||||||
:key id
|
:key id
|
||||||
:sortable? true}])))]]))
|
:sortable? true
|
||||||
|
:filtered? filtered?}])))]]))
|
||||||
|
|
||||||
(mf/defc filters-tree
|
(mf/defc filters-tree
|
||||||
{::mf/wrap [#(mf/memo % =)
|
{::mf/wrap [#(mf/memo % =)
|
||||||
|
@ -336,7 +340,8 @@
|
||||||
:index index
|
:index index
|
||||||
:objects objects
|
:objects objects
|
||||||
:key id
|
:key id
|
||||||
:sortable? false}]))]))
|
:sortable? false
|
||||||
|
:filtered? true}]))]))
|
||||||
|
|
||||||
|
|
||||||
(defn calc-reparented-objects
|
(defn calc-reparented-objects
|
||||||
|
@ -562,15 +567,22 @@
|
||||||
|
|
||||||
filter-component)
|
filter-component)
|
||||||
|
|
||||||
(when (some? filtered-objects)
|
(if (some? filtered-objects)
|
||||||
[:div.tool-window-content {:ref on-render-container :key "filters"}
|
[:*
|
||||||
[:& filters-tree {:objects filtered-objects
|
[:div.tool-window-content {:ref on-render-container :key "filters"}
|
||||||
:key (dm/str (:id page))}]
|
[:& filters-tree {:objects filtered-objects
|
||||||
[:div.lazy {:ref lazy-load-ref
|
:key (dm/str (:id page))}]
|
||||||
:key "lazy-load"
|
[:div.lazy {:ref lazy-load-ref
|
||||||
:style {:min-height 16}}]])
|
: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
|
[:div.tool-window-content {:on-scroll on-scroll
|
||||||
:style {:display (when (some? filtered-objects) "none")}}
|
:style {:display (when (some? filtered-objects) "none")}}
|
||||||
[:& layers-tree {:objects objects
|
[:& layers-tree {:objects objects
|
||||||
:key (dm/str (:id page))}]]]))
|
:key (dm/str (:id page))
|
||||||
|
:filtered? false}]])]))
|
||||||
|
|
Loading…
Add table
Reference in a new issue