Skip to main content

Creating a Sidebar Menu Modifier Class

Follow these steps to create a sidebar menu modifier class:
  1. InΒ ./src, create a file namedΒ SidebarMenuModifier.ts:
    β”œβ”€β”€ package.json
    β”œβ”€β”€ src
    β”‚ β”œβ”€β”€ SidebarMenuModifier.ts <----
    β”‚ β”œβ”€β”€ image
    β”‚ β”‚ β”œβ”€β”€ favicon.ico
    β”‚ β”œβ”€β”€ index.html
    β”‚ β”œβ”€β”€ index.scss
    β”‚ β”œβ”€β”€ index.ts
    β”œβ”€β”€ tsconfig.json
    └── webpack.config.js
  2. Create theΒ SidebarMenuModifierΒ builder class, which receives the NavVis IVION Frontend API as a parameter:
    // SidebarMenuModifier.ts
    import {ApiInterface} from "@navvis/ivion";

    export class SidebarMenuModifier {
    constructor(private ivApi: ApiInterface) {