@@ -28,9 +28,7 @@ RightSidePane = (BreakPointPane, CallStackPane, LocalsPane, WatchPane, StepButto
2828 style : {
2929 display : ' flex'
3030 flex : 1
31- width : " #{ state .sideWidth } px"
32- flexBasis : " #{ state .sideWidth } px"
33- height : " #{ state .height } px"
31+ width : " #{ if state .collapsed then 5 else state .sideWidth } px"
3432 flexDirection : ' row'
3533 }
3634 }, [
@@ -76,7 +74,6 @@ exports.startBottom = (root, _debugger) ->
7674 state .height .set (data .height )
7775
7876 toggleCollapsed = (state , data ) ->
79- console .log (" toggle " + state .collapsed ())
8077 state .collapsed .set (! state .collapsed ())
8178
8279 App = ->
@@ -106,7 +103,7 @@ exports.startBottom = (root, _debugger) ->
106103 cursor : if state .collapsed then ' ' else ' ns-resize'
107104 display : ' flex'
108105 ' flex-direction' : ' column'
109- ' ev-mousedown' : dragHandler state .channels .changeHeight , {}
106+ ' ev-mousedown' : unless state . collapsed then dragHandler state .channels .changeHeight , {}
110107 }, [
111108 h (' div' , {
112109 style : {
@@ -143,6 +140,7 @@ exports.startRight = (root, _debugger) ->
143140 state .sideWidth .set (data .sideWidth )
144141
145142 toggleCollapsed = (state , data ) ->
143+ state .collapsed .set (! state .collapsed ())
146144
147145 App = ->
148146 stepContinue = StepButton (' continue' , ' continue' )
@@ -152,8 +150,10 @@ exports.startRight = (root, _debugger) ->
152150
153151 define = {
154152 sideWidth : hg .value 400
153+ collapsed : hg .value false
155154 channels : {
156155 changeWidth : changeWidth
156+ toggleCollapsed : toggleCollapsed
157157 }
158158 steps : {
159159 stepIn : stepIn
@@ -179,10 +179,22 @@ exports.startRight = (root, _debugger) ->
179179 }, [
180180 h (' div.resizer' , {
181181 style :
182- width : ' 5px'
183- cursor : ' ew-resize'
184- ' ev-mousedown' : dragHandler state .channels .changeWidth , {}
185- })
182+ display : ' flex'
183+ cursor : if state .collapsed then ' ' else ' ew-resize'
184+ ' ev-mousedown' : unless state .collapsed then dragHandler state .channels .changeWidth , {}
185+ }, [
186+ h (' div' , {
187+ style : {
188+ ' align-self' : ' center'
189+ cursor : ' pointer'
190+ ' margin-left' : ' 0px'
191+ ' margin-right' : ' -4px'
192+ }
193+ ' ev-click' : hg .send state .channels .toggleCollapsed
194+ className : if state .collapsed then ' icon-triangle-left' else ' icon-triangle-right'
195+ }, [
196+ ])
197+ ])
186198 RightSidePane (BreakPointPane, CallStackPane, LocalsPane, WatchPane, StepButton, state)
187199 ])
188200
0 commit comments