From 2d1bc67fe36b956f84f0dbe225dd657f7a079655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20James?= Date: Mon, 4 Mar 2024 16:26:04 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20Move=20code=20blocks=20for=20con?= =?UTF-8?q?sistency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CodeMirror6/CodeMirror6WrapperInternal.razor.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CodeMirror6/CodeMirror6WrapperInternal.razor.cs b/CodeMirror6/CodeMirror6WrapperInternal.razor.cs index bfa6b0d..d5fe914 100644 --- a/CodeMirror6/CodeMirror6WrapperInternal.razor.cs +++ b/CodeMirror6/CodeMirror6WrapperInternal.razor.cs @@ -225,6 +225,11 @@ public partial class CodeMirror6WrapperInternal : ComponentBase, IAsyncDisposabl /// public CMCommandDispatcher? CommandDispatcher => CmJsInterop?.CommandDispatcher; + /// + /// Is the JS CodeMirror instance ready? + /// + public bool IsLoaded => CmJsInterop?.IsJSReady == true; + private string SetupId = null!; private string LoadingDivId => $"{SetupId}_Loading"; private string ContainerId => $"{SetupId}_Container"; @@ -248,7 +253,6 @@ public partial class CodeMirror6WrapperInternal : ComponentBase, IAsyncDisposabl private string MaxWidthStyle => FullScreen || (string.IsNullOrEmpty(MaxWidth) && string.IsNullOrEmpty(Width)) ? string.Empty : $"max-width: {MaxWidth ?? Width};"; private string MaxHeightStyle => FullScreen || (string.IsNullOrEmpty(MaxHeight) && string.IsNullOrEmpty(Height)) ? string.Empty : $"max-height: {MaxHeight ?? Height};"; private string EditorStyle => $"{WidthStyle} {HeightStyle} {MaxWidthStyle} {MaxHeightStyle}"; - /// /// JavaScript interop instance /// @@ -475,10 +479,6 @@ protected override async Task OnParametersSetAsync() /// /// protected override bool ShouldRender() => shouldRender; - /// - /// Is the JS CodeMirror instance ready? - /// - public bool IsLoaded => CmJsInterop?.IsJSReady == true; /// /// Dispose resources