Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion core/util/cursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default class Cursor {
}

clear() {
this._target.style.cursor = 'none';
this.setLocalCursor('none');
this._canvas.width = 0;
this._canvas.height = 0;
this._position.x = this._position.x + this._hotSpot.x;
Expand All @@ -115,6 +115,10 @@ export default class Cursor {
this._hotSpot.y = 0;
}

setLocalCursor(cursor) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this fits well with how this class normally operates. I think you'll need to extend the change() API. And probably provide a fallback image for whe we cannot rely on a browser rendered cursor.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the hint.

Reverted with 59e40b4
Proposal b5b7ebe

this._target.style.cursor = cursor;
}

// Mouse events might be emulated, this allows
// moving the cursor in such cases
move(clientX, clientY) {
Expand Down