(container: GoldenLayout.Container, state: InferComponentState<Editor>)
| 450 | // Component Factories |
| 451 | |
| 452 | private codeEditorFactory(container: GoldenLayout.Container, state: InferComponentState<Editor>): Editor { |
| 453 | // Ensure editors are closable: some older versions had 'isClosable' false. |
| 454 | // NB there doesn't seem to be a better way to do this than reach into the config and rely on the fact nothing |
| 455 | // has used it yet. |
| 456 | container.parent.config.isClosable = true; |
| 457 | _.defer(() => { |
| 458 | this.updateCloseButtons(container); |
| 459 | }); |
| 460 | const editor = new Editor(this, state, container); |
| 461 | this.editors.push(editor); |
| 462 | return editor; |
| 463 | } |
| 464 | |
| 465 | private treeFactory(container: GoldenLayout.Container, state: TreeState): Tree { |
| 466 | const tree = new Tree(this, container, state); |
no test coverage detected