Skip to content

Commit 7e6fd2e

Browse files
committed
fix polyshape error
1 parent 97f2221 commit 7e6fd2e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/renderer/tool/impl/element/polyshape.cljs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@
2121
[:div "Double click to finalize the shape."]])
2222

2323
(defn create-polyline
24-
[db points]
24+
[db initial-point]
2525
(let [stroke (document.handlers/attr db :stroke)
2626
fill (document.handlers/attr db :fill)]
2727
(-> db
2828
(tool.handlers/set-state :create)
2929
(element.handlers/add {:type :element
3030
:tag (:tool db)
31-
:attrs {:points (string/join " " points)
31+
:attrs {:points (string/join " " initial-point)
3232
:stroke stroke
3333
:fill fill}}))))
3434

3535
(defn add-point
3636
[db point]
3737
(let [id (:id (first (element.handlers/selected db)))]
38-
(element.handlers/update-attr db id :points str " " point)))
38+
(element.handlers/update-attr db id :points str " " (string/join " " point))))
3939

4040
(defn drop-last-point
4141
[db]

0 commit comments

Comments
 (0)