OutlinerTool.js 704 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * OutlinerTool.js
  3. *
  4. * @author realor
  5. */
  6. import { Tool } from './Tool.js'
  7. import { Outliner } from '../ui/Outliner.js'
  8. class OutlinerTool extends Tool {
  9. constructor(application, options) {
  10. super(application)
  11. this.name = 'outliner'
  12. this.label = 'tool.outliner.label'
  13. this.help = 'tool.outliner.help'
  14. this.className = 'outliner'
  15. this.immediate = true
  16. this.setOptions(options)
  17. this.panel = new Outliner(this.application)
  18. application.panelManager.addPanel(this.panel)
  19. this.panel.visible = false
  20. }
  21. execute() {
  22. this.panel.visible = true
  23. }
  24. }
  25. export { OutlinerTool }