0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-28 07:31:25 -05:00

💄 Format code

This commit is contained in:
alonso.torres 2024-01-08 09:58:08 +01:00 committed by Alonso Torres
parent 25bd70c86f
commit d4f177ffdd
2 changed files with 19 additions and 19 deletions
frontend/src/app/main
data/workspace
ui/viewer

View file

@ -580,11 +580,11 @@
(ptk/reify ::detach-components
ptk/WatchEvent
(watch [_ _ _]
(let [undo-id (js/Symbol)]
(rx/concat
(rx/of (dwu/start-undo-transaction undo-id))
(rx/map #(detach-component %) (rx/from ids))
(rx/of (dwu/commit-undo-transaction undo-id)))))))
(let [undo-id (js/Symbol)]
(rx/concat
(rx/of (dwu/start-undo-transaction undo-id))
(rx/map #(detach-component %) (rx/from ids))
(rx/of (dwu/commit-undo-transaction undo-id)))))))
(def detach-selected-components
(ptk/reify ::detach-selected-components
@ -797,12 +797,12 @@
(watch [_ state _]
(let [current-file-id (:current-file-id state)
undo-id (js/Symbol)]
(rx/of
(dwu/start-undo-transaction undo-id)
(sync-file current-file-id file-id :components component-id undo-group)
(when (not= current-file-id file-id)
(sync-file file-id file-id :components component-id undo-group))
(dwu/commit-undo-transaction undo-id)))))))
(rx/of
(dwu/start-undo-transaction undo-id)
(sync-file current-file-id file-id :components component-id undo-group)
(when (not= current-file-id file-id)
(sync-file file-id file-id :components component-id undo-group))
(dwu/commit-undo-transaction undo-id)))))))
(defn update-component-thumbnail
"Update the thumbnail of the component with the given id, in the
@ -960,15 +960,15 @@
find-frames (fn [change]
(->> (ch/frames-changed file change)
(map #(assoc %1 :page-id (:page-id change)))))
(->> (ch/frames-changed file change)
(map #(assoc %1 :page-id (:page-id change)))))
updated-frames (->> changes
:redo-changes
(mapcat find-frames)
distinct)]
:redo-changes
(mapcat find-frames)
distinct)]
(log/debug :msg "SYNC-FILE finished" :js/rchanges (log-changes
(:redo-changes changes)

View file

@ -95,11 +95,11 @@
:local local
:page page}]
[:div#inspect-svg-wrapper {:class (stl/css :inspect-svg-wrapper)
:data-value (pr-str (:id frame))
:on-click handle-select-frame}
:data-value (pr-str (:id frame))
:on-click handle-select-frame}
[:& viewer-pagination {:index index :num-frames (count (:frames page)) :left-bar true :right-bar true}]
[:div#inspect-svg-container {:class (stl/css :inspect-svg-container)
:ref inspect-svg-container-ref}
:ref inspect-svg-container-ref}
[:& render-frame-svg {:frame frame :page page :local local :size size}]]]
[:div {:class (stl/css-case :sidebar-container true