Make local cursor accessible/configurable

This commit is contained in:
Daniel Hammerschmidt 2025-09-15 21:43:25 +02:00
parent 44b7489e73
commit 6eb28b890d
1 changed files with 5 additions and 1 deletions

View File

@ -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;
@ -115,6 +115,10 @@ export default class Cursor {
this._hotSpot.y = 0;
}
setLocalCursor(cursor) {
this._target.style.cursor = cursor;
}
// Mouse events might be emulated, this allows
// moving the cursor in such cases
move(clientX, clientY) {