Skip to content

Commit

Permalink
resizeable param
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Oct 26, 2023
1 parent 7bccaf5 commit 6d3520c
Showing 1 changed file with 33 additions and 14 deletions.
47 changes: 33 additions & 14 deletions src/spaces/layout/fixed.cljs
Expand Up @@ -2,35 +2,54 @@
(:require
[spaces.core :as spaces]))

(defn main-top [{:keys [top main top-size height width]
(defn main-top [{:keys [top main top-size height width scrollable resizeable-top]
:or {top-size 50
height "100%"
width "100%"}}]
width "100%"
scrollable false
resizeable-top true}}]
;(println "layout-fixed mt ...")
[spaces/fixed {:height height :width width}
[spaces/top-resizeable {:size top-size} top]
[spaces/fill {:scrollable false}
(if resizeable-top
[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 left right top-px left-size height width]
(defn left-right-top [{:keys [top left right top-px left-size height width scrollable resizeable-left resizeable-top]
:or {top-px 50
left-size "50%"
height "100%"
width "100%"}}]
width "100%"
scrollable false
resizeable-top true
resizeable-left true}}]
;(println "layout-fixed lrt ...")
[spaces/fixed {:height height :width width}
[spaces/top-resizeable {:size top-px} top]
(if resizeable-top
[spaces/top-resizeable {:size top-px} top]
[spaces/top {:size top-px} top])
[spaces/fill
[spaces/left-resizeable {:size left-size :scrollable false} left]
[spaces/fill {:scrollable false} right]]])
(if resizeable-left
[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 right middle left-size right-size height width]
(defn left-right-middle [{:keys [left right middle left-size right-size height width scrollable
resizeable-left resizeable-right]
:or {left-size "25%"
right-size "25%"
height "100%"
width "100%"}}]
width "100%"
scrollable false
resizeable-left true
resizeable-right true}}]
;(println "layout-fixed lrm ...")
[spaces/fixed {:height height :width width}
[spaces/left-resizeable {:size left-size} left]
[spaces/right-resizeable {:size right-size} right]
[spaces/fill {:scrollable false} middle]])
(if resizeable-left
[spaces/left-resizeable {:size left-size :scrollable scrollable} left]
[spaces/left {:size left-size :scrollable scrollable} left])
(if resizeable-right
[spaces/right-resizeable {:size right-size :scrollable scrollable} right]
[spaces/right {:size right-size :scrollable scrollable} right])
[spaces/fill {:scrollable scrollable} middle]])

0 comments on commit 6d3520c

Please sign in to comment.