File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/renderer/tool/impl/element Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 21
21
[:div " Double click to finalize the shape." ]])
22
22
23
23
(defn create-polyline
24
- [db points ]
24
+ [db initial-point ]
25
25
(let [stroke (document.handlers/attr db :stroke )
26
26
fill (document.handlers/attr db :fill )]
27
27
(-> db
28
28
(tool.handlers/set-state :create )
29
29
(element.handlers/add {:type :element
30
30
:tag (:tool db)
31
- :attrs {:points (string/join " " points )
31
+ :attrs {:points (string/join " " initial-point )
32
32
:stroke stroke
33
33
:fill fill}}))))
34
34
35
35
(defn add-point
36
36
[db point]
37
37
(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) )))
39
39
40
40
(defn drop-last-point
41
41
[db]
You can’t perform that action at this time.
0 commit comments