0
Fork 0
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:
Andrey Antukh 2017-01-11 21:06:29 +01:00
parent da9bebf95c
commit a5554b51cd
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95
3 changed files with 9 additions and 7 deletions
frontend/src/uxbox/main/ui

View file

@ -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]))

View file

@ -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))))

View file

@ -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 []})