|
12 | 12 |
|
13 | 13 | (defn panel* |
14 | 14 | [] |
15 | | - (let [width (r/atom 200) |
16 | | - height (r/atom 200) |
17 | | - min-width (r/atom 200) |
18 | | - max-width (r/atom 200) |
19 | | - max-height (r/atom 200) |
20 | | - min-height (r/atom 200) |
21 | | - body-width (r/atom 200) |
22 | | - anchor-width (r/atom 200)] |
| 15 | + (let [width (r/atom 200) |
| 16 | + height (r/atom 200) |
| 17 | + min-width (r/atom 200) |
| 18 | + max-width (r/atom 200) |
| 19 | + max-height (r/atom 200) |
| 20 | + min-height (r/atom 200) |
| 21 | + anchor-height (r/atom 200) |
| 22 | + body-width (r/atom 200) |
| 23 | + body-height (r/atom 200) |
| 24 | + anchor-width (r/atom 200)] |
23 | 25 | (fn [] |
24 | 26 | [v-box :src (at) :size "auto" :gap "10px" |
25 | 27 | :children |
|
52 | 54 | :model model |
53 | 55 | :width (some-> @width px)} |
54 | 56 | (when @height {:height (px @height)}) |
| 57 | + (when @anchor-height {:anchor-height (px @anchor-height)}) |
| 58 | + (when @body-height {:body-height (px @body-height)}) |
55 | 59 | {:min-width (some-> @min-width px) |
56 | 60 | :max-width (some-> @max-width px) |
57 | 61 | :max-height (some-> @max-height px) |
|
68 | 72 | :children [[title3 "Interactive Parameters" {:margin-top "0"}] |
69 | 73 | [v-box :src (at) |
70 | 74 | :gap "20px" |
71 | | - :children [[prop-slider {:prop width :id :width :default 212 :default-on? false}] |
72 | | - [prop-slider {:prop height :id :height :default 212 :default-on? false}] |
73 | | - [prop-slider {:prop min-width :id :min-width :default 212 :default-on? false}] |
74 | | - [prop-slider {:prop max-width :id :max-width :default 212 :default-on? false}] |
75 | | - [prop-slider {:prop min-height :id :min-height :default 212 :default-on? false}] |
76 | | - [prop-slider {:prop max-height :id :max-height :default 212 :default-on? false}] |
77 | | - [prop-slider {:prop body-width :id :body-width :default 212 :default-on? false}] |
78 | | - [prop-slider {:prop anchor-width :id :anchor-width :default 212 :default-on? false}]]]]]]]]] |
| 75 | + :children |
| 76 | + [[prop-slider {:prop width :id :width :default 212 :default-on? false}] |
| 77 | + [prop-slider {:prop height :id :height :default 212 :default-on? false}] |
| 78 | + [prop-slider {:prop min-width :id :min-width :default 212 :default-on? false}] |
| 79 | + [prop-slider {:prop max-width :id :max-width :default 212 :default-on? false}] |
| 80 | + [prop-slider {:prop min-height :id :min-height :default 212 :default-on? false}] |
| 81 | + [prop-slider {:prop max-height :id :max-height :default 212 :default-on? false}] |
| 82 | + [prop-slider {:prop body-width :id :body-width :default 212 :default-on? false}] |
| 83 | + [prop-slider {:prop body-height :id :body-height :default 212 :default-on? false}] |
| 84 | + [prop-slider {:prop anchor-height :id :anchor-height :default 35 :default-on? false :min 10 :max 50}] |
| 85 | + [prop-slider {:prop anchor-width :id :anchor-width :default 212 :default-on? false}]]]]]]]]] |
79 | 86 | [parts-table "dropdown" dropdown-parts-desc]]]))) |
80 | 87 |
|
81 | 88 | ;; core holds a reference to panel, so need one level of indirection to get figwheel updates |
|
0 commit comments