Skip to content

Commit

Permalink
bugfix layout
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Oct 30, 2023
1 parent 9e7237a commit 97784ef
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
43 changes: 22 additions & 21 deletions src/spaces/layout/fixed.cljs
Expand Up @@ -2,53 +2,54 @@
(:require
[spaces.core :as spaces]))

(defn main-top [{:keys [top main top-size height width scrollable resizeable-top]
:or {top-size 50
height "100%"
(defn main-top [{:keys [height width scrollable
top top-size top-resizeable
main]
:or {height "100%"
width "100%"
scrollable false
resizeable-top true}}]
top-size 50
top-resizeable true}}]
;(println "layout-fixed mt ...")
[spaces/fixed {:height height :width width}
(if resizeable-top
(if top-resizeable
[spaces/top-resizeable {:size top-size :scrollable scrollable} top]
[spaces/top {:size top-size :scrollable scrollable} top])
[spaces/fill {:scrollable scrollable}
main]])

(defn left-right-top [{:keys [top top-px top-resizeable
(defn left-right-top [{:keys [height width scrollable
top top-size top-resizeable
left left-size left-resizeable
right
height width scrollable]
:or {top-px 50
left-size "50%"
height "100%"
right]
:or {height "100%"
width "100%"
scrollable false
top-size 50
top-resizeable true
left-size "50%"
left-resizeable true}}]
;(println "layout-fixed lrt ...")
[spaces/fixed {:height height :width width}
(if top-resizeable
[spaces/top-resizeable {:size top-px} top]
[spaces/top {:size top-px} top])
[spaces/top-resizeable {:size top-size} top]
[spaces/top {:size top-size} top])
[spaces/fill
(if left-resizeable
[spaces/left-resizeable {:size left-size :scrollable scrollable} left]
[spaces/left {:size left-size :scrollable scrollable} left])
[spaces/fill {:scrollable scrollable} right]]])

(defn left-right-middle [{:keys [left left-size left-resizeable
right right-size right-resizeable-right
middle
height width
scrollable]
:or {left-size "25%"
right-size "25%"
height "100%"
(defn left-right-middle [{:keys [height width scrollable
left left-size left-resizeable
right right-size right-resizeable
middle]
:or {height "100%"
width "100%"
scrollable false
left-size "25%"
left-resizeable true
right-size "25%"
right-resizeable true}}]
;(println "layout-fixed lrm ...")
[spaces/fixed {:height height :width width}
Expand Down
2 changes: 1 addition & 1 deletion src/spaces/layout/screen.cljs
Expand Up @@ -37,8 +37,8 @@
right right-size right-resizeable
middle]
:or {left-size "25%"
right-size "25%"
left-resizeable true
right-size "25%"
right-resizeable true}}]
;(println "layout-viewport lrm ...")
[spaces/viewport
Expand Down

0 comments on commit 97784ef

Please sign in to comment.