♻️ Remove ? char from shape attrs

This commit is contained in:
Andrey Antukh 2023-05-29 18:21:48 +02:00
parent 405aa66357
commit 6e7595f48c
36 changed files with 203 additions and 168 deletions

View file

@ -8,6 +8,7 @@
(:require
[app.common.files.builder :as fb]
[app.common.uuid :as uuid]
[app.common.types.shape :as cts]
[app.util.snap-data :as sd]
[cljs.pprint :refer [pprint]]
[cljs.test :as t :include-macros true]))
@ -180,17 +181,17 @@
(fb/close-artboard))
shape-id (:last-id file)
page (fb/get-current-page file)
page (fb/get-current-page file)
;; frame-id (:last-id file)
data (-> (sd/make-snap-data)
(sd/add-page page))
data (-> (sd/make-snap-data)
(sd/add-page page))
file (-> file
(fb/delete-object shape-id))
file (-> file
(fb/delete-object shape-id))
new-page (fb/get-current-page file)
data (sd/update-page data page new-page)
data (sd/update-page data page new-page)
result-x (sd/query data (:id page) uuid/zero :x [0 100])
result-y (sd/query data (:id page) uuid/zero :y [0 100])]
@ -332,18 +333,20 @@
:height 100})
(fb/close-artboard))
frame-id (:last-id file)
page (fb/get-current-page file)
data (-> (sd/make-snap-data) (sd/add-page page))
frame-id (:last-id file)
page (fb/get-current-page file)
data (-> (sd/make-snap-data) (sd/add-page page))
frame (fb/lookup-shape file frame-id)
frame (fb/lookup-shape file frame-id)
new-frame (-> frame
(assoc :x 200 :y 200))
(dissoc :selrect :points)
(assoc :x 200 :y 200)
(cts/setup-shape))
file (fb/update-object file frame new-frame)
new-page (fb/get-current-page file)
file (fb/update-object file frame new-frame)
new-page (fb/get-current-page file)
data (sd/update-page data page new-page)
data (sd/update-page data page new-page)
result-zero-x-1 (sd/query data (:id page) uuid/zero :x [0 100])
result-frame-x-1 (sd/query data (:id page) frame-id :x [0 100])
@ -371,6 +374,7 @@
shape (fb/lookup-shape file shape-id)
new-shape (-> shape
(dissoc :selrect :points)
(assoc :x 200 :y 200))
file (fb/update-object file shape new-shape)