Skip to content

Commit 96e3ae7

Browse files
johanneseggergalvesribeiro
authored andcommitted
Support Preview 9 (#38)
* Support Preview 9 * Remove `BECanvasComponent.OnClick` because @OnClick doesn't seem to be supported for a canvas.
1 parent 3e5d82d commit 96e3ae7

File tree

12 files changed

+14
-17
lines changed

12 files changed

+14
-17
lines changed

.vsts-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ steps:
77
- task: DotNetCoreInstaller@0
88
inputs:
99
packageType: 'sdk'
10-
version: 3.0.100-preview8-013656
10+
version: 3.0.100-preview9-014004
1111
- task: Npm@1
1212
inputs:
1313
command: 'install'

.vsts-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ steps:
77
- task: DotNetCoreInstaller@0
88
inputs:
99
packageType: 'sdk'
10-
version: 3.0.100-preview8-013656
10+
version: 3.0.100-preview9-014004
1111

1212
- task: Npm@1
1313
inputs:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ private Canvas2DContext _context;
5252

5353
protected BECanvasComponent _canvasReference;
5454

55-
protected override async Task OnAfterRenderAsync()
55+
protected override async Task OnAfterRenderAsync(bool firstRender)
5656
{
5757
this._context = await this._canvasReference.CreateCanvas2DAsync();
5858
await this._context.SetFillStyleAsync("green");
@@ -75,7 +75,7 @@ private WebGLContext _context;
7575

7676
protected BECanvasComponent _canvasReference;
7777

78-
protected override async Task OnAfterRenderAsync()
78+
protected override async Task OnAfterRenderAsync(bool firstRender)
7979
{
8080
this._context = await this._canvasReference.CreateWebGLAsync();
8181

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
@inherits BECanvasComponent
22

3-
<canvas id="@Id" width="@Width" height="@Height" @ref="_canvasRef" @ref:suppressField @onclick="OnClick"></canvas>
3+
<canvas id="@Id" width="@Width" height="@Height" @ref="_canvasRef"></canvas>

src/Blazor.Extensions.Canvas/BECanvasComponent.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,5 @@ public class BECanvasComponent : ComponentBase
1919

2020
[Inject]
2121
internal IJSRuntime JSRuntime { get; set; }
22-
23-
[Parameter]
24-
public Action<UIMouseEventArgs> OnClick { get; set; }
2522
}
2623
}

src/Blazor.Extensions.Canvas/Blazor.Extensions.Canvas.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</PropertyGroup>
1919

2020
<ItemGroup>
21-
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.0.0-preview8.19405.7" />
21+
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.0.0-preview9.19424.4" />
2222
</ItemGroup>
2323

2424
<ItemGroup>

test/Blazor.Extensions.Canvas.Test.ClientSide/Blazor.Extensions.Canvas.Test.ClientSide.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.AspNetCore.Blazor" Version="3.0.0-preview8.19405.7" />
12-
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="3.0.0-preview8.19405.7" PrivateAssets="all" />
13-
<PackageReference Include="Microsoft.AspNetCore.Blazor.DevServer" Version="3.0.0-preview8.19405.7" PrivateAssets="all" />
11+
<PackageReference Include="Microsoft.AspNetCore.Blazor" Version="3.0.0-preview9.19424.4" />
12+
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="3.0.0-preview9.19424.4" PrivateAssets="all" />
13+
<PackageReference Include="Microsoft.AspNetCore.Blazor.DevServer" Version="3.0.0-preview9.19424.4" PrivateAssets="all" />
1414
</ItemGroup>
1515

1616
<ItemGroup>

test/Blazor.Extensions.Canvas.Test.ClientSide/Pages/IndexComponent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class IndexComponent : ComponentBase
1010

1111
protected BECanvasComponent _canvasReference;
1212

13-
protected override async Task OnAfterRenderAsync()
13+
protected override async Task OnAfterRenderAsync(bool firstRender)
1414
{
1515
this._context = await this._canvasReference.CreateCanvas2DAsync();
1616
await this._context.SetFillStyleAsync("green");

test/Blazor.Extensions.Canvas.Test.ClientSide/Pages/WebGLComponent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class WebGLComponent : ComponentBase
2727
"gl_FragColor = vec4(vColor, 1.0);" +
2828
"}";
2929

30-
protected override async Task OnAfterRenderAsync()
30+
protected override async Task OnAfterRenderAsync(bool firstRender)
3131
{
3232
this._context = await this._canvasReference.CreateWebGLAsync(new WebGLContextAttributes
3333
{

test/Blazor.Extensions.Canvas.Test.ServerSide/Pages/IndexComponent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class IndexComponent : ComponentBase
1010

1111
protected BECanvasComponent _canvasReference;
1212

13-
protected override async Task OnAfterRenderAsync()
13+
protected override async Task OnAfterRenderAsync(bool firstRender)
1414
{
1515
this._context = await this._canvasReference.CreateCanvas2DAsync();
1616
await this._context.SetFillStyleAsync("green");

0 commit comments

Comments
 (0)