-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WASM] Implement Cursors API #7295
Conversation
@@ -254,9 +255,11 @@ protected override void OnAfterRender(bool firstRender) | |||
Threading.Dispatcher.UIThread.Post(async () => | |||
{ | |||
_inputHelper = await InputHelperInterop.ImportAsync(Js, _inputElement); | |||
_canvasHelper = await InputHelperInterop.ImportAsync(Js, _htmlCanvas); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's required to set cursor to _htmlCanvas, because setting cursor to the _inputElement is not working - because it's always display:none;
|
||
namespace Avalonia.Web.Blazor | ||
{ | ||
public class CssCursor : ICursorImpl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this class is public, not internal, to allow end users to use some custom constructors that will allow to use cursors that's is not in the StandardCursorType
enum values list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
You can test this PR using the following package version. |
You can test this PR using the following package version. |
[WASM] Implement Cursors API
Even custom cursors are working.