0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-03 12:59:12 -05:00

🐛 Fix linter issues

This commit is contained in:
Andrés Moya 2023-03-21 16:52:19 +01:00 committed by Andrés Moya
parent 1d026ab085
commit ce3e30ea02
5 changed files with 7 additions and 16 deletions

View file

@ -21,7 +21,7 @@
[app.metrics :as mtx] [app.metrics :as mtx]
[app.msgbus :as mbus] [app.msgbus :as mbus]
[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.doc :as-alias doc] [app.rpc.doc :as-alias doc]
[app.rpc.helpers :as rph] [app.rpc.helpers :as rph]

View file

@ -276,7 +276,7 @@ textarea {
max-width: 85%; max-width: 85%;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
line-height: $lh-115; // Original value was 16px; 16px/14px = 114.285714286% => $lh-115 (rounded) line-height: $lh-115; // Original value was 16px; 16px/14px = 114.285714286% => $lh-115 (rounded)
font-size: $fs14; font-size: $fs14;
color: $color-black; color: $color-black;
} }

View file

@ -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

View file

@ -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))))

View file

@ -140,22 +140,13 @@
(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/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/reify ::shift-select-shapes
ptk/UpdateEvent ptk/UpdateEvent
(update [_ state] (update [_ state]
(let [page-id (:current-page-id state) (let [page-id (:current-page-id state)
objects (wsh/lookup-page-objects state page-id) objects (or objects (wsh/lookup-page-objects state page-id))
selection (-> state selection (-> state
wsh/lookup-selected wsh/lookup-selected
(conj id))] (conj id))]