From d16419edf6f85185b80c09f793c390079daa9dc1 Mon Sep 17 00:00:00 2001 From: redhoodsu Date: Fri, 6 Jan 2023 13:29:04 +0800 Subject: [PATCH] chore: small changes --- src/EntryBtn/EntryBtn.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/EntryBtn/EntryBtn.js b/src/EntryBtn/EntryBtn.js index 4827d73..ce6a516 100644 --- a/src/EntryBtn/EntryBtn.js +++ b/src/EntryBtn/EntryBtn.js @@ -101,10 +101,12 @@ export default class EntryBtn extends Emitter { const maxWidth = this._$container.get(0).offsetWidth const maxHeight = this._$container.get(0).offsetHeight - this._isClick = false e = e.origEvent const deltaX = eventClient('x', e) - this._startX const deltaY = eventClient('y', e) - this._startY + if (Math.abs(deltaX) > 3 || Math.abs(deltaY) > 3) { + this._isClick = false + } let newX = this._oldX + deltaX let newY = this._oldY + deltaY if (newX < 0) {