Make local cursor accessible/configurable
This commit is contained in:
parent
44b7489e73
commit
6eb28b890d
|
|
@ -106,7 +106,7 @@ export default class Cursor {
|
||||||
}
|
}
|
||||||
|
|
||||||
clear() {
|
clear() {
|
||||||
this._target.style.cursor = 'none';
|
this.setLocalCursor('none');
|
||||||
this._canvas.width = 0;
|
this._canvas.width = 0;
|
||||||
this._canvas.height = 0;
|
this._canvas.height = 0;
|
||||||
this._position.x = this._position.x + this._hotSpot.x;
|
this._position.x = this._position.x + this._hotSpot.x;
|
||||||
|
|
@ -115,6 +115,10 @@ export default class Cursor {
|
||||||
this._hotSpot.y = 0;
|
this._hotSpot.y = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setLocalCursor(cursor) {
|
||||||
|
this._target.style.cursor = cursor;
|
||||||
|
}
|
||||||
|
|
||||||
// Mouse events might be emulated, this allows
|
// Mouse events might be emulated, this allows
|
||||||
// moving the cursor in such cases
|
// moving the cursor in such cases
|
||||||
move(clientX, clientY) {
|
move(clientX, clientY) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue