MCPcopy Create free account
hub / github.com/DTStack/molecule / initView

Method initView

src/controller/panel.tsx:37–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35 }
36
37 public initView() {
38 const {
39 builtInOutputPanel,
40 builtInPanelToolbox,
41 builtInPanelToolboxResize,
42 } = this.builtinService.getModules();
43 if (builtInOutputPanel) {
44 const output = builtInOutputPanel;
45 output.renderPane = (item) => (
46 <Output
47 onUpdateEditorIns={(instance) => {
48 // Please notice the problem about memory out
49 // 'Cause we didn't dispose the older instance
50 item.outputEditorInstance = instance;
51 }}
52 {...item}
53 />
54 );
55 this.panelService.add(output);
56 this.panelService.setActive(output.id);
57 }
58
59 const toolbox = [builtInPanelToolboxResize, builtInPanelToolbox].filter(
60 Boolean
61 ) as IActionBarItemProps[];
62
63 this.panelService.setState({
64 toolbox,
65 });
66 }
67
68 public readonly onTabChange = (key: UniqueId): void => {
69 if (key) {

Callers 1

InstanceServiceClass · 0.45

Calls 4

setStateMethod · 0.80
getModulesMethod · 0.65
addMethod · 0.65
setActiveMethod · 0.65

Tested by

no test coverage detected