0.13.1 • Published 6 years ago

atom-outlet v0.13.1

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

atom-outlet

Build Status

Library to create outlet

  • Close from keyboard without focusing
  • Hide from keyboard without focusing
  • Relocate from keyboard without focusing
  • Emulate hiding outlet in center workspace by relocating to dock.

Related

Atom package outlet-manager provides useful commands to manipulate outlets in workspace in uniform manner.

Example

const outlet = require('atom-outlet')

// outlet.create return instance of TextEditor
// With special `open`, `relocate`, `show`, `hide`, `toggle`, `focus`, `toggleFocus`, `link` methods.
const editor = outlet.create({
  title: 'Sample outlet',
  classList: ['sample'],
  defaultLocation: 'bottom'
  extendsTextEditor: true
})

await editor.open()
editor.hide() // atom.workspace.hide(editor)
editor.show() // show dock
editor.relocate() // relocate to center workspace
editor.toggle()
editor.show()
editor.focus()

Default options for create

const DEFAULT_EDITOR_OPTIONS = {
  buffer: undefined,
  autoHeight: false
}

const DEFAULT_OPTIONS = {
  editorOptions: DEFAULT_EDITOR_OPTIONS, // pass-through-ed to `new TextEditor(editorOptions)`.
  allowedLocations: ['center', 'bottom'],  // One of ['center', 'bottom', 'left', 'right']
  defaultLocation: ['bottom'], // One of ['center', 'bottom', 'left', 'right']
  split: 'right', // Which direction  to split in center workspace
  title: undefined,
  trackModified: false, // When false, you won't be asked to save when closing outlet
  classList: [],
  useAdjacentPane: true, // By default pick adjacent pane to open outlet if exists.
}
0.13.1

6 years ago

0.13.0

6 years ago

0.12.0

6 years ago

0.11.0

6 years ago

0.10.0

6 years ago

0.9.0

6 years ago

0.8.0

6 years ago

0.7.0

6 years ago

0.6.0

6 years ago

0.5.0

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago