0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-26 08:29:42 -05:00

🐛 Fix initial shape names

This commit is contained in:
Andrés Moya 2021-08-13 13:42:33 +02:00
parent f6742d1bbf
commit 1de1eb6b9b
2 changed files with 7 additions and 7 deletions

View file

@ -15,7 +15,7 @@
(def empty-page-data (def empty-page-data
{:options {} {:options {}
:name "Page" :name "Page-1"
:objects :objects
{root {root
{:id root {:id root
@ -38,7 +38,7 @@
(def ^:private minimal-shapes (def ^:private minimal-shapes
[{:type :rect [{:type :rect
:name "Rect" :name "Rect-1"
:fill-color default-color :fill-color default-color
:fill-opacity 1 :fill-opacity 1
:stroke-style :none :stroke-style :none
@ -52,7 +52,7 @@
{:type :image} {:type :image}
{:type :circle {:type :circle
:name "Circle" :name "Circle-1"
:fill-color default-color :fill-color default-color
:fill-opacity 1 :fill-opacity 1
:stroke-style :none :stroke-style :none
@ -62,7 +62,7 @@
:stroke-opacity 0} :stroke-opacity 0}
{:type :path {:type :path
:name "Path" :name "Path-1"
:stroke-style :solid :stroke-style :solid
:stroke-alignment :center :stroke-alignment :center
:stroke-width 2 :stroke-width 2
@ -70,7 +70,7 @@
:stroke-opacity 1} :stroke-opacity 1}
{:type :frame {:type :frame
:name "Artboard" :name "Artboard-1"
:fill-color "#ffffff" :fill-color "#ffffff"
:fill-opacity 1 :fill-opacity 1
:stroke-style :none :stroke-style :none
@ -80,7 +80,7 @@
:stroke-opacity 0} :stroke-opacity 0}
{:type :text {:type :text
:name "Text" :name "Text-1"
:content nil} :content nil}
{:type :svg-raw}]) {:type :svg-raw}])

View file

@ -274,7 +274,7 @@
(watch [it state _] (watch [it state _]
(let [pages (get-in state [:workspace-data :pages-index]) (let [pages (get-in state [:workspace-data :pages-index])
unames (dwc/retrieve-used-names pages) unames (dwc/retrieve-used-names pages)
name (dwc/generate-unique-name unames "Page") name (dwc/generate-unique-name unames "Page-1")
rchange {:type :add-page rchange {:type :add-page
:id id :id id