Skip to content

Commit

Permalink
When SVG Mover original text changes, move the elements
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgrammerAL committed May 6, 2024
1 parent cc459e4 commit f89b243
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/SvgHelpers/SvgHelpers/Components/SvgMoverComponent.razor
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
<StandaloneDiffEditor @ref="_diffEditor"
Id="diff-editor"
ConstructionOptions="DiffEditorConstructionOptions"
OnDidInit="EditorOnDidInit" />
OnDidInit="EditorOnDidInit"
OnDidChangeModelContentOriginal="HandleOriginalContentChangedAsync"
/>

</div>
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ private async void HandleYAmountChangedAsync(ChangeEventArgs e)
await HandleInputChangedAsync();
}

private async Task HandleOriginalContentChangedAsync(ModelContentChangedEvent e)
{
await HandleInputChangedAsync();
}

private async Task HandleInputChangedAsync()
{
var originalModel = await GetOrCreateTextModelAsync(EditorOriginalTextModel);
Expand Down

0 comments on commit f89b243

Please sign in to comment.