File tree Expand file tree Collapse file tree 2 files changed +27
-24
lines changed
src/Blazor.Extensions.Canvas Expand file tree Collapse file tree 2 files changed +27
-24
lines changed Original file line number Diff line number Diff line change 1
1
@inherits BECanvasComponent
2
2
3
- <canvas id =" @Id" width =" @Width" height =" @Height" @ref =" _canvasRef" ></canvas >
3
+ <canvas id =" @Id" width =" @Width" height =" @Height" @ref =" _canvasRef" @onclick = " OnClick " ></canvas >
Original file line number Diff line number Diff line change 1
- using Microsoft . AspNetCore . Components ;
2
- using Microsoft . JSInterop ;
3
- using System ;
4
-
5
- namespace Blazor . Extensions
6
- {
7
- public class BECanvasComponent : ComponentBase
8
- {
9
- [ Parameter ]
10
- protected long Height { get ; set ; }
11
-
12
- [ Parameter ]
13
- protected long Width { get ; set ; }
14
-
15
- protected readonly string Id = Guid . NewGuid ( ) . ToString ( ) ;
16
- protected ElementRef _canvasRef ;
17
-
18
- internal ElementRef CanvasReference => this . _canvasRef ;
19
-
20
- [ Inject ]
21
- internal IJSRuntime JSRuntime { get ; set ; }
22
- }
23
- }
1
+ using Microsoft . AspNetCore . Components ;
2
+ using Microsoft . JSInterop ;
3
+ using System ;
4
+
5
+ namespace Blazor . Extensions
6
+ {
7
+ public class BECanvasComponent : ComponentBase
8
+ {
9
+ [ Parameter ]
10
+ protected long Height { get ; set ; }
11
+
12
+ [ Parameter ]
13
+ protected long Width { get ; set ; }
14
+
15
+ protected readonly string Id = Guid . NewGuid ( ) . ToString ( ) ;
16
+ protected ElementRef _canvasRef ;
17
+
18
+ internal ElementRef CanvasReference => this . _canvasRef ;
19
+
20
+ [ Inject ]
21
+ internal IJSRuntime JSRuntime { get ; set ; }
22
+
23
+ [ Parameter ]
24
+ protected Action < UIMouseEventArgs > OnClick { get ; set ; }
25
+ }
26
+ }
You can’t perform that action at this time.
0 commit comments