Skip to content

Commit

Permalink
Fix SetReadOnly
Browse files Browse the repository at this point in the history
  • Loading branch information
StefH committed Apr 27, 2021
1 parent d97f4ef commit 8a736ec
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</PropertyGroup>

<PropertyGroup>
<VersionPrefix>0.0.6</VersionPrefix>
<VersionPrefix>0.0.7</VersionPrefix>
</PropertyGroup>

<Choose>
Expand Down
2 changes: 1 addition & 1 deletion GitHubReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
https://github.com/StefH/GitHubReleaseNotes

GitHubReleaseNotes --output ReleaseNotes.md --skip-empty-releases --exclude-labels question invalid doc --version 0.0.6
GitHubReleaseNotes --output ReleaseNotes.md --skip-empty-releases --exclude-labels question invalid doc --version 0.0.7
4 changes: 2 additions & 2 deletions examples/jsMind.WASM.App/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,12 @@

async Task MindMapClickable()
{
await _myTreeNodeContainer.SetReadonly(false);
await _myTreeNodeContainer.SetReadOnly(false);
}

async Task MindMapNotClickable()
{
await _myTreeNodeContainer.SetReadonly(true);
await _myTreeNodeContainer.SetReadOnly(true);
}

async Task CollapseTree()
Expand Down
13 changes: 5 additions & 8 deletions src/jsMind.Blazor/Components/MindMapContainer.Interop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,18 @@ public ValueTask Collapse()
return Runtime.InvokeVoidAsync("MindMap.collapse", _containerId);
}

public async ValueTask SetReadonly(bool @readonly)
public async ValueTask SetReadOnly(bool @readonly)
{
Options.Readonly = @readonly;
Options.ReadOnly = @readonly;

await Runtime.InvokeVoidAsync("MindMap.setReadOnly", _containerId, @readonly);

if (@readonly)
{
await SetEditable(false);
}
await SetEditable(!@readonly);
}

public bool IsReadonly()
public bool IsReadOnly()
{
return Options.Readonly;
return Options.ReadOnly;
}

private ValueTask DisposeMindMap()
Expand Down
2 changes: 1 addition & 1 deletion src/jsMind.Blazor/Models/MindMapOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public class MindMapOptions
{
public bool Editable { get; set; }

public bool Readonly { get; set; }
public bool ReadOnly { get; set; }

public bool MultiSelect { get; set; }

Expand Down

0 comments on commit 8a736ec

Please sign in to comment.