From 97784ef886a3d61fd6bbe118e46760779c47342f Mon Sep 17 00:00:00 2001 From: awb99 Date: Sun, 29 Oct 2023 20:48:34 -0500 Subject: [PATCH] bugfix layout --- src/spaces/layout/fixed.cljs | 43 ++++++++++++++++++----------------- src/spaces/layout/screen.cljs | 2 +- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/spaces/layout/fixed.cljs b/src/spaces/layout/fixed.cljs index 3b532c8..22d0752 100644 --- a/src/spaces/layout/fixed.cljs +++ b/src/spaces/layout/fixed.cljs @@ -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} diff --git a/src/spaces/layout/screen.cljs b/src/spaces/layout/screen.cljs index 60b1d56..76a8572 100644 --- a/src/spaces/layout/screen.cljs +++ b/src/spaces/layout/screen.cljs @@ -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