mirror of
https://github.com/penpot/penpot.git
synced 2025-03-19 19:21:23 -05:00
Fix path drawing.
This commit is contained in:
parent
da9bebf95c
commit
a5554b51cd
3 changed files with 9 additions and 7 deletions
|
@ -2,7 +2,7 @@
|
|||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) 2016 Andrey Antukh <niwi@niwi.nz>
|
||||
;; Copyright (c) 2016-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
|
||||
(ns uxbox.main.ui.shapes
|
||||
(:require [uxbox.main.ui.shapes.group :as group]))
|
||||
|
|
|
@ -42,8 +42,10 @@
|
|||
|
||||
(defn- transform-stroke-attrs
|
||||
[{:keys [stroke-style] :or {stroke-style :none} :as attrs}]
|
||||
(if (= stroke-style :none)
|
||||
(dissoc attrs :stroke-style :stroke-width :stroke-opacity :stroke-color)
|
||||
(case stroke-style
|
||||
:none (dissoc attrs :stroke-style :stroke-width :stroke-opacity :stroke-color)
|
||||
:solid (-> (merge shape-default-attrs attrs)
|
||||
(dissoc :stroke-style))
|
||||
(-> (merge shape-default-attrs attrs)
|
||||
(assoc :stroke-dasharray (stroke-type->dasharray stroke-style))
|
||||
(dissoc :stroke-style))))
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
(def +draw-tool-rect+
|
||||
{:type :rect
|
||||
:name "Rect"
|
||||
:stroke "#000000"})
|
||||
:stroke-color "#000000"})
|
||||
|
||||
(def +draw-tool-circle+
|
||||
{:type :circle
|
||||
|
@ -43,10 +43,10 @@
|
|||
(def +draw-tool-path+
|
||||
{:type :path
|
||||
:name "Path"
|
||||
:stroke-type :solid
|
||||
:stroke "#000000"
|
||||
:stroke-style :solid
|
||||
:stroke-color "#000000"
|
||||
:stroke-width 2
|
||||
:fill "#000000"
|
||||
:fill-color "#000000"
|
||||
:fill-opacity 0
|
||||
;; :close? true
|
||||
:points []})
|
||||
|
|
Loading…
Add table
Reference in a new issue