mirror of
https://github.com/penpot/penpot.git
synced 2025-03-12 07:41:43 -05:00
🐛 Fix linter issues
This commit is contained in:
parent
131e4f2446
commit
5d77f7e5b1
4 changed files with 8 additions and 16 deletions
|
@ -15,7 +15,7 @@
|
||||||
[app.loggers.webhooks :as-alias webhooks]
|
[app.loggers.webhooks :as-alias webhooks]
|
||||||
[app.media :as media]
|
[app.media :as media]
|
||||||
[app.rpc :as-alias rpc]
|
[app.rpc :as-alias rpc]
|
||||||
[app.rpc.climit :as-alias climit]
|
[app.rpc.climit :as climit]
|
||||||
[app.rpc.commands.files :as files]
|
[app.rpc.commands.files :as files]
|
||||||
[app.rpc.commands.projects :as projects]
|
[app.rpc.commands.projects :as projects]
|
||||||
[app.rpc.commands.teams :as teams]
|
[app.rpc.commands.teams :as teams]
|
||||||
|
|
|
@ -105,7 +105,7 @@
|
||||||
(defn created-thread-on-viewer
|
(defn created-thread-on-viewer
|
||||||
[{:keys [id comment page-id] :as thread}]
|
[{:keys [id comment page-id] :as thread}]
|
||||||
|
|
||||||
(ptk/reify ::created-thread-on-workspace
|
(ptk/reify ::created-thread-on-viewer
|
||||||
ptk/UpdateEvent
|
ptk/UpdateEvent
|
||||||
(update [_ state]
|
(update [_ state]
|
||||||
(-> state
|
(-> state
|
||||||
|
|
|
@ -24,14 +24,14 @@
|
||||||
|
|
||||||
(defn select-grid-cell
|
(defn select-grid-cell
|
||||||
[grid-id row column]
|
[grid-id row column]
|
||||||
(ptk/reify ::hover-grid-cell
|
(ptk/reify ::select-grid-cell
|
||||||
ptk/UpdateEvent
|
ptk/UpdateEvent
|
||||||
(update [_ state]
|
(update [_ state]
|
||||||
(assoc-in state [:workspace-grid-edition grid-id :selected] [row column]))))
|
(assoc-in state [:workspace-grid-edition grid-id :selected] [row column]))))
|
||||||
|
|
||||||
(defn remove-selection
|
(defn remove-selection
|
||||||
[grid-id]
|
[grid-id]
|
||||||
(ptk/reify ::hover-grid-cell
|
(ptk/reify ::remove-selection
|
||||||
ptk/UpdateEvent
|
ptk/UpdateEvent
|
||||||
(update [_ state]
|
(update [_ state]
|
||||||
(update-in state [:workspace-grid-edition grid-id] dissoc :selected))))
|
(update-in state [:workspace-grid-edition grid-id] dissoc :selected))))
|
||||||
|
|
|
@ -140,22 +140,14 @@
|
||||||
(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]
|
||||||
|
(shift-select-shapes id nil))
|
||||||
|
|
||||||
([id objects]
|
([id objects]
|
||||||
(ptk/reify ::shift-select-shapes
|
(ptk/reify ::shift-select-shapes
|
||||||
ptk/UpdateEvent
|
ptk/UpdateEvent
|
||||||
(update [_ state]
|
(update [_ state]
|
||||||
(let [selection (-> state
|
(let [objects (or objects (wsh/lookup-page-objects 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
|
|
||||||
(update [_ state]
|
|
||||||
(let [page-id (:current-page-id state)
|
|
||||||
objects (wsh/lookup-page-objects state page-id)
|
|
||||||
selection (-> state
|
selection (-> state
|
||||||
wsh/lookup-selected
|
wsh/lookup-selected
|
||||||
(conj id))]
|
(conj id))]
|
||||||
|
|
Loading…
Add table
Reference in a new issue