mirror of
https://github.com/penpot/penpot.git
synced 2025-05-20 22:06:10 +02:00
Fix path drawing.
This commit is contained in:
parent
da9bebf95c
commit
a5554b51cd
3 changed files with 9 additions and 7 deletions
frontend/src/uxbox/main/ui
|
@ -2,7 +2,7 @@
|
||||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
;; 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/.
|
;; 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
|
(ns uxbox.main.ui.shapes
|
||||||
(:require [uxbox.main.ui.shapes.group :as group]))
|
(:require [uxbox.main.ui.shapes.group :as group]))
|
||||||
|
|
|
@ -42,8 +42,10 @@
|
||||||
|
|
||||||
(defn- transform-stroke-attrs
|
(defn- transform-stroke-attrs
|
||||||
[{:keys [stroke-style] :or {stroke-style :none} :as attrs}]
|
[{:keys [stroke-style] :or {stroke-style :none} :as attrs}]
|
||||||
(if (= stroke-style :none)
|
(case stroke-style
|
||||||
(dissoc attrs :stroke-style :stroke-width :stroke-opacity :stroke-color)
|
: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)
|
(-> (merge shape-default-attrs attrs)
|
||||||
(assoc :stroke-dasharray (stroke-type->dasharray stroke-style))
|
(assoc :stroke-dasharray (stroke-type->dasharray stroke-style))
|
||||||
(dissoc :stroke-style))))
|
(dissoc :stroke-style))))
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
(def +draw-tool-rect+
|
(def +draw-tool-rect+
|
||||||
{:type :rect
|
{:type :rect
|
||||||
:name "Rect"
|
:name "Rect"
|
||||||
:stroke "#000000"})
|
:stroke-color "#000000"})
|
||||||
|
|
||||||
(def +draw-tool-circle+
|
(def +draw-tool-circle+
|
||||||
{:type :circle
|
{:type :circle
|
||||||
|
@ -43,10 +43,10 @@
|
||||||
(def +draw-tool-path+
|
(def +draw-tool-path+
|
||||||
{:type :path
|
{:type :path
|
||||||
:name "Path"
|
:name "Path"
|
||||||
:stroke-type :solid
|
:stroke-style :solid
|
||||||
:stroke "#000000"
|
:stroke-color "#000000"
|
||||||
:stroke-width 2
|
:stroke-width 2
|
||||||
:fill "#000000"
|
:fill-color "#000000"
|
||||||
:fill-opacity 0
|
:fill-opacity 0
|
||||||
;; :close? true
|
;; :close? true
|
||||||
:points []})
|
:points []})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue