mirror of
https://github.com/atom/atom.git
synced 2026-02-18 10:31:54 -05:00
wip
This commit is contained in:
@@ -1,44 +0,0 @@
|
||||
$ = require 'jquery'
|
||||
|
||||
module.exports =
|
||||
class Pane
|
||||
position: null
|
||||
|
||||
html: null
|
||||
|
||||
showing: false
|
||||
|
||||
constructor: (@window) ->
|
||||
|
||||
add: ->
|
||||
verticalDiv = $('#app-vertical')
|
||||
horizontalDiv = $('#app-horizontal')
|
||||
|
||||
el = $ "<div>"
|
||||
el.addClass "pane " + @position
|
||||
el.append @html
|
||||
|
||||
switch @position
|
||||
when 'main'
|
||||
$('.main').replaceWith el
|
||||
when 'top'
|
||||
verticalDiv.prepend el
|
||||
when 'left'
|
||||
horizontalDiv.prepend el
|
||||
when 'bottom'
|
||||
verticalDiv.append el
|
||||
when 'right'
|
||||
horizontalDiv.append el
|
||||
else
|
||||
throw "I DON'T KNOW HOW TO DEAL WITH #{@position}"
|
||||
|
||||
toggle: ->
|
||||
if @showing
|
||||
@html.parent().detach()
|
||||
else
|
||||
@add this
|
||||
|
||||
@showing = not @showing
|
||||
|
||||
# Override these in your subclass
|
||||
initialize: ->
|
||||
Reference in New Issue
Block a user