KristofferStrube / Blazor.SVGEditor

A basic SVG editor written in Blazor.
https://kristofferstrube.github.io/Blazor.SVGEditor/
MIT License
310 stars 51 forks source link

SVGEditor code in a server-side app : System.InvalidOperationException: The current thread is not associated with the Dispatcher #2

Closed pcarret closed 1 year ago

pcarret commented 3 years ago

When using the SVGEditor code in a server-side app and editing the svg as text in textarea

"System.InvalidOperationException: The current thread is not associated with the Dispatcher" <SVG @ref=SVG1 Input=@Input1 InputUpdated="(string s) => { Input1 = s; StateHasChanged(); }" />

After reading this <SVG @ref=SVG1 Input=@Input1 InputUpdated="(string s) => { Input1 = s; InvokeAsync(StateHasChanged); }" /> Solve the issue

KristofferStrube commented 3 years ago

Nice.

I will try to add a full Blazor Server sample with this addtion. :)

KristofferStrube commented 1 year ago

Hey @pcarret. Long time since we talked last. I just wanted to share that I have added a Blazor Server example to prepare to release this to NuGet. Hope you are doing well.