From 982d7e7c17e2b17702e7efc0dfb834c74d800bd4 Mon Sep 17 00:00:00 2001
From: MarcosPierasNL <pieras.marcos@gmail.com>
Date: Thu, 22 Aug 2024 11:55:42 +0200
Subject: [PATCH] feat: add showMinimap configuration option

---
 libs/shared/lib/data-access/store/schemaSlice.ts | 2 ++
 libs/shared/lib/schema/panel/SchemaSettings.tsx  | 8 ++++++++
 2 files changed, 10 insertions(+)

diff --git a/libs/shared/lib/data-access/store/schemaSlice.ts b/libs/shared/lib/data-access/store/schemaSlice.ts
index 39bd69e4e..e0398dac1 100644
--- a/libs/shared/lib/data-access/store/schemaSlice.ts
+++ b/libs/shared/lib/data-access/store/schemaSlice.ts
@@ -12,6 +12,7 @@ export type SchemaSettings = {
   connectionType: SchemaConnectionTypes;
   layoutName: AllLayoutAlgorithms;
   animatedEdges: boolean;
+  showMinimap: boolean;
 };
 
 type schemaSliceI = {
@@ -37,6 +38,7 @@ export const initialState: schemaSliceI = {
     connectionType: 'connection',
     layoutName: Layouts.DAGRE,
     animatedEdges: false,
+    showMinimap: true,
   },
 };
 export const schemaSlice = createSlice({
diff --git a/libs/shared/lib/schema/panel/SchemaSettings.tsx b/libs/shared/lib/schema/panel/SchemaSettings.tsx
index 0a6534d52..572472aa0 100644
--- a/libs/shared/lib/schema/panel/SchemaSettings.tsx
+++ b/libs/shared/lib/schema/panel/SchemaSettings.tsx
@@ -19,6 +19,14 @@ export const SchemaSettings = () => {
           dispatch(setSchemaSettings({ ...settings, animatedEdges: value as any }));
         }}
       />
+      <Input
+        type="boolean"
+        value={settings.showMinimap}
+        label="Show Minimap"
+        onChange={(value: boolean) => {
+          dispatch(setSchemaSettings({ ...settings, showMinimap: value as any }));
+        }}
+      />
       <Input
         type="dropdown"
         label="Type of Connection"
-- 
GitLab