Skip to content

Commit 307dd5f

Browse files
Added width parameter to IconMaker demo.
1 parent babbe11 commit 307dd5f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

samples/KristofferStrube.Blazor.SVGEditor.WasmExample/Pages/IconMaker.razor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ namespace KristofferStrube.Blazor.SVGEditor.WasmExample.Pages;
44
public partial class IconMaker
55
{
66
protected SVGEditor sVGEditor = default!;
7-
87
protected string Input = "";
8+
protected int width = 16;
99

1010
protected void InputHasBeenRendered()
1111
{
12-
double newScale = 1 / (16 / sVGEditor.BBox.Height);
12+
double newScale = 1 / (width / sVGEditor.BBox.Height);
1313
if (sVGEditor.Scale != newScale)
1414
{
1515
sVGEditor.Scale = newScale;
@@ -27,4 +27,4 @@ public async Task Copy()
2727

2828
await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", SVG);
2929
}
30-
}
30+
}

0 commit comments

Comments
 (0)