Skip to content

Commit

Permalink
use script.min.js to prevent breaking exisiting users
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-wachsmuth committed Mar 19, 2024
1 parent 545fc9d commit 204e081
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Blazor.Diagrams/Components/DiagramCanvas.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)

if (firstRender)
{
_module ??= await JSRuntime.InvokeAsync<IJSObjectReference>("import","./_content/Z.Blazor.Diagrams/script.js");
_module ??= await JSRuntime.InvokeAsync<IJSObjectReference>("import","./_content/Z.Blazor.Diagrams/script.min.js");
BlazorDiagram.SetContainer(await _module.GetBoundingClientRect(elementReference));

await _module.ObserveResizes(elementReference, _reference!);
Expand Down
2 changes: 1 addition & 1 deletion src/Blazor.Diagrams/Components/Renderers/NodeRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
_module ??= await JsRuntime.InvokeAsync<IJSObjectReference>("import", "./_content/Z.Blazor.Diagrams/script.js");
_module ??= await JsRuntime.InvokeAsync<IJSObjectReference>("import", "./_content/Z.Blazor.Diagrams/script.min.js");
}

if (firstRender || _becameVisible)
Expand Down
4 changes: 2 additions & 2 deletions src/Blazor.Diagrams/Components/Renderers/PortRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
_module ??= await JSRuntime.InvokeAsync<IJSObjectReference>("import", "./_content/Z.Blazor.Diagrams/script.js");
_module ??= await JSRuntime.InvokeAsync<IJSObjectReference>("import", "./_content/Z.Blazor.Diagrams/script.min.js");
}
if (!Port.Initialized)
{
Expand Down Expand Up @@ -131,7 +131,7 @@ private async Task UpdateDimensions()
var zoom = BlazorDiagram.Zoom;
var pan = BlazorDiagram.Pan;

_module ??= await JSRuntime.InvokeAsync<IJSObjectReference>("import", "./_content/Z.Blazor.Diagrams/script.js");
_module ??= await JSRuntime.InvokeAsync<IJSObjectReference>("import", "./_content/Z.Blazor.Diagrams/script.min.js");

var rect = await _module.GetBoundingClientRect(_element);
Port.Size = new Size(rect.Width / zoom, rect.Height / zoom);
Expand Down
1 change: 1 addition & 0 deletions src/Blazor.Diagrams/wwwroot/script.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 204e081

Please sign in to comment.