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

Method initButtonsVisibility

static/panes/tool.ts:314–334  ·  view source on GitHub ↗
(state: ToolState & MonacoPaneState)

Source from the content-addressed store, hash-verified

312 }
313
314 initButtonsVisibility(state: ToolState & MonacoPaneState) {
315 this.toggleArgs = this.domRoot.find('.toggle-args');
316 this.toggleStdin = this.domRoot.find('.toggle-stdin');
317 this.artifactBtn = this.domRoot.find('.artifact-btn');
318 this.artifactText = this.domRoot.find('.artifact-text');
319
320 if (state.argsPanelShown === true) {
321 this.showPanel(this.toggleArgs, this.panelArgs);
322 }
323
324 if (state.stdinPanelShown === true) {
325 if (!this.monacoStdin) {
326 this.showPanel(this.toggleStdin, this.panelStdin);
327 } else {
328 if (!this.monacoEditorOpen) {
329 this.openMonacoEditor();
330 }
331 }
332 }
333 this.artifactBtn.addClass('d-none');
334 }
335
336 showPanel(button: JQuery, panel: JQuery) {
337 panel.removeClass('d-none');

Callers 1

registerButtonsMethod · 0.95

Calls 3

showPanelMethod · 0.95
openMonacoEditorMethod · 0.95
findMethod · 0.80

Tested by

no test coverage detected