Skip to content

Commit

Permalink
Shorter IDs for AudioEditor.
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferStrube committed Jun 5, 2024
1 parent ce4a022 commit d48bec3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public Node(IElement element, SVGEditor.SVGEditor svg) : base(element, svg)
string? id = element.GetAttribute("id");
if (id is null || svg.Elements.Any(e => e.Id == id))
{
Id = Guid.NewGuid().ToString();
Id = Guid.NewGuid().ToString()[..8];
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
</div>

<textarea @bind="Input" @bind:event="oninput" style="width:100%;height:10vh;" @bind:after=AudioEditor.StopAsync />
<textarea @bind="Input" @bind:event="oninput" style="width:100%;height:10vh;" @bind:after=StopAudioEditor />

@if (Code is null)
{
Expand Down Expand Up @@ -50,6 +50,14 @@ else
Input ??= "";
}

private async Task StopAudioEditor()
{
if (AudioEditor is not null)
{
await AudioEditor.StopAsync();
}
}

private async Task URLEncode()
{
string code = ToGzip(Input!);
Expand Down

0 comments on commit d48bec3

Please sign in to comment.