画笔指示器偶尔丢失

This commit is contained in:
李志鹏
2025-11-14 15:24:54 +08:00
parent dd02a2000c
commit 9b0e50555b

View File

@@ -406,7 +406,8 @@ export class BrushIndicator {
this._mouseMoveHandler = (e) => {
if (this._shouldShowIndicator()) {
if (!this.isVisible) {
this.show(e.e);
// this.show(e.e);
this._mouseEnterHandler && this._mouseEnterHandler(e)
} else {
// requestIdleCallback(() => {
// this.updatePosition(e.e);
@@ -433,7 +434,6 @@ export class BrushIndicator {
*/
_unbindEvents() {
if (!this.canvas) return;
// 解绑鼠标事件
if (this._mouseEnterHandler) {
this.canvas.off("mouse:over", this._mouseEnterHandler);