Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sprocketc committed Nov 27, 2024
1 parent c57216b commit b672770
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
6 changes: 4 additions & 2 deletions src/renderer/attribute/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,14 @@
[property k]
(when-let [v (get property k)]
[:<>
[:h3.font-bold (-> k csk/->kebab-case-string (str/replace "-" " ") str/capitalize)]
[:h3.font-bold (if (= k :appliesto)
"Applies to"
(-> k csk/->kebab-case-string (str/replace "-" " ") str/capitalize))]
[:p (cond->> v (vector? v) (str/join " | "))]]))

(defn property-list
[property]
(->> [:appliesto :computed :percentages :animatable :animationType :styleDeclaration :syntax]
(->> [:appliesto :computed :percentages :animatable :animationType :syntax]
(map #(property-list-item property %))
(into [:<>])))

Expand Down
6 changes: 1 addition & 5 deletions src/renderer/document/db.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@
[malli.transform :as mt]
[renderer.element.db :refer [Element]]
[renderer.history.db :refer [History]]
[renderer.menubar.filters :as filters]
[renderer.menubar.filters :refer [A11yFilter]]
[renderer.utils.math :refer [Vec2D]]))

(def ZoomFactor
[:and number? [:>= 0.01] [:<= 100]])

(def A11yFilter
(into [:enum] (map :id filters/accessibility)))

(def Document
[:map {:closed true}
[:id {:optional true :persist true} uuid?]
Expand Down Expand Up @@ -44,4 +41,3 @@
(def explain (m/explainer Document))

(def default (m/decode Document {} mt/default-value-transformer))

3 changes: 3 additions & 0 deletions src/renderer/menubar/filters.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,6 @@
0.163, 0.775, 0.062, 0, 0
0.163, 0.320, 0.516, 0, 0
0, 0, 0, 1, 0]}}])

(def A11yFilter
(into [:enum] (map :id accessibility)))
2 changes: 1 addition & 1 deletion src/renderer/snap/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

(rf/reg-global-interceptor
(rf/->interceptor
:id ::auto-rebuild-tree
:id ::auto-update-tree
:after (fn [context]
(let [db (rf/get-effect context :db)]
(if (:active-document db)
Expand Down

0 comments on commit b672770

Please sign in to comment.