diff --git a/src/Cropper.Blazor/Client/Enums/BasePage.cs b/src/Cropper.Blazor/Client/Enums/BasePage.cs
index ce626554..cf5bd1b2 100644
--- a/src/Cropper.Blazor/Client/Enums/BasePage.cs
+++ b/src/Cropper.Blazor/Client/Enums/BasePage.cs
@@ -6,5 +6,6 @@ public enum BasePage
Demo,
Examples,
Api,
- About
+ About,
+ Contract
}
diff --git a/src/Cropper.Blazor/Client/Services/LayoutService.cs b/src/Cropper.Blazor/Client/Services/LayoutService.cs
index 69e40020..2571548f 100644
--- a/src/Cropper.Blazor/Client/Services/LayoutService.cs
+++ b/src/Cropper.Blazor/Client/Services/LayoutService.cs
@@ -94,6 +94,8 @@ public BasePage GetDocsBasePage(string uri)
return BasePage.Api;
else if (uri.Contains("/about"))
return BasePage.About;
+ else if (uri.Contains("/contract"))
+ return BasePage.Contract;
else
return BasePage.None;
}
diff --git a/src/Cropper.Blazor/Client/Services/MenuService.cs b/src/Cropper.Blazor/Client/Services/MenuService.cs
index 4852980a..a77240bd 100644
--- a/src/Cropper.Blazor/Client/Services/MenuService.cs
+++ b/src/Cropper.Blazor/Client/Services/MenuService.cs
@@ -48,7 +48,8 @@ public class MenuService : IMenuService
new DocsLink {Title = "ContainerData", Href = "contract/ContainerData"},
new DocsLink {Title = "CanvasData", Href = "contract/CanvasData"},
new DocsLink {Title = "CropBoxData", Href = "contract/CropBoxData"},
- new DocsLink {Title = "JSEventData", Href = "contract/JSEventData"}
+ new DocsLink {Title = "JSEventData", Href = "contract/JSEventData"},
+ new DocsLink {Title = "ViewMode", Href = "contract/ViewMode"}
};
}
}
diff --git a/src/Cropper.Blazor/Client/Shared/DocsLayout.razor b/src/Cropper.Blazor/Client/Shared/DocsLayout.razor
index bedcafee..72e256ca 100644
--- a/src/Cropper.Blazor/Client/Shared/DocsLayout.razor
+++ b/src/Cropper.Blazor/Client/Shared/DocsLayout.razor
@@ -30,10 +30,13 @@
Api
About
- }
+ }
- @if (!_topMenuOpen && LayoutService.GetDocsBasePage(NavigationManager.Uri) == BasePage.Examples)
+ @{
+ BasePage docsBasePage = LayoutService.GetDocsBasePage(NavigationManager.Uri);
+ }
+ @if (!_topMenuOpen && (docsBasePage== BasePage.Examples || docsBasePage == BasePage.Api || docsBasePage == BasePage.Contract))
{
}
diff --git a/src/Cropper.Blazor/Client/Shared/DocsLayout.razor.cs b/src/Cropper.Blazor/Client/Shared/DocsLayout.razor.cs
index 65d054ed..ea6618c2 100644
--- a/src/Cropper.Blazor/Client/Shared/DocsLayout.razor.cs
+++ b/src/Cropper.Blazor/Client/Shared/DocsLayout.razor.cs
@@ -21,7 +21,7 @@ protected override void OnInitialized()
protected override void OnAfterRender(bool firstRender)
{
//refresh nav menu because no parameters change in nav menu but internal data does
- _navMenuRef?.Refresh();
+ //_navMenuRef?.Refresh();
}
private void ToggleDrawer() => _drawerOpen = !_drawerOpen;