MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / constructor

Method constructor

static/panes/output.ts:69–85  ·  view source on GitHub ↗
(hub: Hub, container: Container, state: OutputState & PaneState)

Source from the content-addressed store, hash-verified

67 private isOutputCurrentSelection = false;
68
69 constructor(hub: Hub, container: Container, state: OutputState & PaneState) {
70 // canonicalize state
71 if ((state as any).compiler) state.id = (state as any).compiler;
72 if ((state as any).editor) state.editorid = (state as any).editor;
73 if ((state as any).tree) state.treeid = (state as any).tree;
74 super(hub, container, state);
75 this.hub = hub;
76 this.contentRoot = this.domRoot.find('.content');
77 this.optionsToolbar = this.domRoot.find('.options-toolbar');
78 this.fontScale = new FontScale(this.domRoot, state, '.content');
79 this.fontScale.on('change', this.updateState.bind(this));
80 this.normalAnsiToHtml = makeAnsiToHtml();
81 this.errorAnsiToHtml = makeAnsiToHtml('var(--terminal-red)');
82 this.eventHub.emit('outputOpened', this.compilerInfo.compilerId);
83 this.eventHub.on('printrequest', this.sendPrintData, this);
84 this.onOptionsChange();
85 }
86
87 private onClickCallback(e: JQuery.ClickEvent) {
88 this.isOutputCurrentSelection = this.contentRoot[0].contains(e.target);

Callers

nothing calls this directly

Calls 5

onOptionsChangeMethod · 0.95
findMethod · 0.80
makeAnsiToHtmlFunction · 0.70
onMethod · 0.45
emitMethod · 0.45

Tested by

no test coverage detected