Hide minimap in c8y-editor

I try to hide the minimap in c8y-editor using the following

  @ViewChild('sourceEditor', { static: false })
  editorOptions: EditorComponent['editorOptions'] = {
     minimap: { enabled: false },
     semanticValidation: false,
     diagnostics: {
       noSemanticValidation: true,
       noSyntaxValidation: true
     }
  };

Version: “@c8y/ngx-components”: “^1021.0.11”

this does not work as expected:

Hi @Christof_Strack,

I’m not quite sure what you are trying to achive using the:

The EditorComponent has an editorOptions input, which you can utilize to achive what you want:

<c8y-editor
  [editorOptions]="editorOptions"
></c8y-editor>

Regards,
Tristan

Hi @Tristan_Bastian,

I use

  <c8y-editor class="flex-grow"  style ="height:500px" [editorOptions]="editorOptions" [ngModel]="source$ | async"
    monacoEditorMarkerValidator></c8y-editor>

as you suggested.
But using the setting as suggested here does not work.

  @ViewChild('sourceEditor', { static: false })
  editorOptions: EditorComponent['editorOptions'] = {
    minimap: { enabled: false }
  };

As mentioned in my previous post, I don’t know how you came up with the @ViewChild('sourceEditor', { static: false }) annotation. This might be overwriting the value you are assigning to editorOptions.

Please remove the @ViewChild('sourceEditor', { static: false }) annotation and try again.

1 Like

Thank you.
Everything works now by removing @ViewChild('sourceEditor', { static: false })
The settings I was looking foe where:

  editorOptions: EditorComponent['editorOptions'] = {
    minimap: { enabled: false },
    renderValidationDecorations: "off"
  };
1 Like