atom-pane
A lightweight wrapper for creating new panes within Atom.
Usage
atom-pane
is packaged as an npm module, so you can simply install it like
you would your other package dependencies.
uri = createPane([opts], ready, [closed])
Create a new pane, calling ready(err, pane)
when complete. The returned pane
is an instance of ScrollView
, but you can easily append standard DOM elements
like so:
var createPane =exports {atomworkspaceView}
You'll need to clean up after yourself too – use the closed
callback function,
which will get called when the pane has been closed.
Takes the following options:
-
opts.searchAllPanes
passed ontoatom.workspace.open
, defaults tofalse
. -
opts.uri
may be one of the following:undefined
, in which case a unique value will be genrated for you.- A unique string, e.g.
markdown-preview-pane
. - A full URI, e.g.
markdown-preview://Users/hughsk/README.md
.
Note that the latter two approaches are recommended, to prevent creating a bunch of one-off openers each time a user opens a pane.
-
opts.changeFocus
passed ontoatom.workspace.open
, defaults totrue
. -
opts.split
passed ontoatom.workspace.open
, defaults toundefined
.
License
MIT. See LICENSE.md for details.