mirror of
https://github.com/penpot/penpot.git
synced 2025-08-06 15:08:27 +02:00
💄 Format code
This commit is contained in:
parent
25bd70c86f
commit
d4f177ffdd
2 changed files with 19 additions and 19 deletions
|
@ -580,11 +580,11 @@
|
||||||
(ptk/reify ::detach-components
|
(ptk/reify ::detach-components
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ _ _]
|
(watch [_ _ _]
|
||||||
(let [undo-id (js/Symbol)]
|
(let [undo-id (js/Symbol)]
|
||||||
(rx/concat
|
(rx/concat
|
||||||
(rx/of (dwu/start-undo-transaction undo-id))
|
(rx/of (dwu/start-undo-transaction undo-id))
|
||||||
(rx/map #(detach-component %) (rx/from ids))
|
(rx/map #(detach-component %) (rx/from ids))
|
||||||
(rx/of (dwu/commit-undo-transaction undo-id)))))))
|
(rx/of (dwu/commit-undo-transaction undo-id)))))))
|
||||||
|
|
||||||
(def detach-selected-components
|
(def detach-selected-components
|
||||||
(ptk/reify ::detach-selected-components
|
(ptk/reify ::detach-selected-components
|
||||||
|
@ -797,12 +797,12 @@
|
||||||
(watch [_ state _]
|
(watch [_ state _]
|
||||||
(let [current-file-id (:current-file-id state)
|
(let [current-file-id (:current-file-id state)
|
||||||
undo-id (js/Symbol)]
|
undo-id (js/Symbol)]
|
||||||
(rx/of
|
(rx/of
|
||||||
(dwu/start-undo-transaction undo-id)
|
(dwu/start-undo-transaction undo-id)
|
||||||
(sync-file current-file-id file-id :components component-id undo-group)
|
(sync-file current-file-id file-id :components component-id undo-group)
|
||||||
(when (not= current-file-id file-id)
|
(when (not= current-file-id file-id)
|
||||||
(sync-file file-id file-id :components component-id undo-group))
|
(sync-file file-id file-id :components component-id undo-group))
|
||||||
(dwu/commit-undo-transaction undo-id)))))))
|
(dwu/commit-undo-transaction undo-id)))))))
|
||||||
|
|
||||||
(defn update-component-thumbnail
|
(defn update-component-thumbnail
|
||||||
"Update the thumbnail of the component with the given id, in the
|
"Update the thumbnail of the component with the given id, in the
|
||||||
|
@ -960,15 +960,15 @@
|
||||||
|
|
||||||
|
|
||||||
find-frames (fn [change]
|
find-frames (fn [change]
|
||||||
(->> (ch/frames-changed file change)
|
(->> (ch/frames-changed file change)
|
||||||
(map #(assoc %1 :page-id (:page-id change)))))
|
(map #(assoc %1 :page-id (:page-id change)))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
updated-frames (->> changes
|
updated-frames (->> changes
|
||||||
:redo-changes
|
:redo-changes
|
||||||
(mapcat find-frames)
|
(mapcat find-frames)
|
||||||
distinct)]
|
distinct)]
|
||||||
|
|
||||||
(log/debug :msg "SYNC-FILE finished" :js/rchanges (log-changes
|
(log/debug :msg "SYNC-FILE finished" :js/rchanges (log-changes
|
||||||
(:redo-changes changes)
|
(:redo-changes changes)
|
||||||
|
|
|
@ -95,11 +95,11 @@
|
||||||
:local local
|
:local local
|
||||||
:page page}]
|
:page page}]
|
||||||
[:div#inspect-svg-wrapper {:class (stl/css :inspect-svg-wrapper)
|
[:div#inspect-svg-wrapper {:class (stl/css :inspect-svg-wrapper)
|
||||||
:data-value (pr-str (:id frame))
|
:data-value (pr-str (:id frame))
|
||||||
:on-click handle-select-frame}
|
:on-click handle-select-frame}
|
||||||
[:& viewer-pagination {:index index :num-frames (count (:frames page)) :left-bar true :right-bar true}]
|
[:& 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)
|
[: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}]]]
|
[:& render-frame-svg {:frame frame :page page :local local :size size}]]]
|
||||||
|
|
||||||
[:div {:class (stl/css-case :sidebar-container true
|
[:div {:class (stl/css-case :sidebar-container true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue