mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2025-01-06 06:28:33 +03:00
Getting panes ready for split viewing.
This commit is contained in:
parent
a83003d7c5
commit
6e1cee2e88
@ -5,7 +5,7 @@
|
||||
<body>
|
||||
<div id='app-horizontal'>
|
||||
<div id='app-vertical'>
|
||||
<div id='main-container' class='main pane'></div>
|
||||
<div id='main'></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -16,10 +16,8 @@ class Pane
|
||||
|
||||
switch @position
|
||||
when 'main'
|
||||
# There can be multiple 'main' panes, but only one can be active
|
||||
# at at time. ICK.
|
||||
$('#main-container').children().css 'display', 'none !important'
|
||||
$('#main-container').append @pane
|
||||
$('#main > div').addClass 'hidden'
|
||||
$('#main').append @pane
|
||||
when 'top'
|
||||
verticalDiv.prepend @pane
|
||||
when 'left'
|
||||
@ -32,19 +30,17 @@ class Pane
|
||||
throw "pane position of #{this} can't be `#{@position}`"
|
||||
|
||||
showing: ->
|
||||
@pane and not @pane.css('display').match /none/
|
||||
@pane and not @pane.hasClass 'hidden'
|
||||
|
||||
show: ->
|
||||
if @position == 'main'
|
||||
$('#main-container').children().css 'display', 'none !important'
|
||||
|
||||
if not @pane
|
||||
@add()
|
||||
else
|
||||
@pane.css 'display', '-webkit-box !important'
|
||||
$('#main > div').addClass 'hidden' if @position == 'main'
|
||||
@pane.removeClass 'hidden'
|
||||
|
||||
hide: ->
|
||||
@pane.css 'display', 'none !important'
|
||||
@pane.addClass 'hidden'
|
||||
|
||||
toggle: ->
|
||||
if @showing()
|
||||
|
@ -22,10 +22,20 @@ body {
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
#main {
|
||||
display: -webkit-box;
|
||||
-webkit-box-flex: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.main {
|
||||
-webkit-box-flex: 1;
|
||||
}
|
||||
|
||||
.pane.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pane {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
|
Loading…
Reference in New Issue
Block a user