mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 07:50:43 -05:00
Remove unused code from canvas.
This commit is contained in:
parent
c9dc332ae2
commit
efeaa7a79e
1 changed files with 2 additions and 24 deletions
|
@ -125,17 +125,7 @@
|
||||||
[]
|
[]
|
||||||
(let [page (rum/react wb/page-state)
|
(let [page (rum/react wb/page-state)
|
||||||
page-width (:width page)
|
page-width (:width page)
|
||||||
page-height (:height page)
|
page-height (:height page)]
|
||||||
;; selection-uuids (rum/react selected-ids)
|
|
||||||
;; selected-shapes (rum/react selected-shapes)
|
|
||||||
;; raw-shapes (into []
|
|
||||||
;; (comp
|
|
||||||
;; (filter :shape/visible?)
|
|
||||||
;; (filter #(not (contains? selection-uuids (:shape/uuid %))))
|
|
||||||
;; (map :shape/data))
|
|
||||||
;; shapes)
|
|
||||||
item (first _icons/+external+)
|
|
||||||
]
|
|
||||||
(html
|
(html
|
||||||
[:svg.page-canvas
|
[:svg.page-canvas
|
||||||
{:x wb/document-start-x
|
{:x wb/document-start-x
|
||||||
|
@ -147,24 +137,12 @@
|
||||||
(fn [event]
|
(fn [event]
|
||||||
(rx/push! wb/selected-shape-b :nothing)
|
(rx/push! wb/selected-shape-b :nothing)
|
||||||
(dom/stop-propagation event))
|
(dom/stop-propagation event))
|
||||||
|
|
||||||
;; :on-mouse-down cs/on-mouse-down
|
|
||||||
;; :on-mouse-up cs/on-mouse-up
|
|
||||||
}
|
}
|
||||||
(background)
|
(background)
|
||||||
[:svg.page-layout {}
|
[:svg.page-layout {}
|
||||||
(for [shapeid (:shapes page)
|
(for [shapeid (:shapes page)
|
||||||
:let [item (get-in page [:shapes-by-id shapeid])]]
|
:let [item (get-in page [:shapes-by-id shapeid])]]
|
||||||
(rum/with-key (shape item) (str shapeid)))]
|
(rum/with-key (shape item) (str shapeid)))]])))
|
||||||
#_(apply vector :svg#page-layout (map shapes/shape->svg raw-shapes))
|
|
||||||
#_(when-let [shape (rum/react drawing)]
|
|
||||||
(shapes/shape->drawing-svg shape))
|
|
||||||
#_(when-not (empty? selected-shapes)
|
|
||||||
(let [rs selected-shapes]
|
|
||||||
(vec (cons :g
|
|
||||||
(concat
|
|
||||||
(map shapes/shape->selected-svg rs)
|
|
||||||
(map shapes/shape->svg rs))))))])))
|
|
||||||
|
|
||||||
(def canvas
|
(def canvas
|
||||||
(util/component
|
(util/component
|
||||||
|
|
Loading…
Reference in a new issue