-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(MovableCoord): fire release event #290
Conversation
fire release event when moved different direction that was set. Ref naver#288
} else if (e.isFinal && e.direction !== MC.DIRECTION_NONE && | ||
!(e.direction & this._subOptions.direction)) { | ||
// Although direction of movement is different from options.direction, MC should fire 'release' event. | ||
this._panend(e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jongmoon you'd better make _triggerRelease
method like this
_triggerRelease: function(e) {
this._setInterrupt(false);
this.trigger("release", {
//...
});
and I find potential bug due to your PR.
we should also initalize this._status.moveDistance
thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sculove OK, I also think that _panend do much~
I'm happy to help you find the potential bug related with moveDistance
.
@@ -411,7 +413,7 @@ eg.module("movableCoord", ["jQuery", eg, window, "Hammer"], function($, ns, glob | |||
} | |||
|
|||
// Abort the animating post process when "tap" occurs | |||
if (e.type === "tap") { | |||
if (e.distance === 0 /*e.type === "tap"*/) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should remove tap recognizer in _createHammer
method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sculove I applied it yesterday.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok I got it!
LGTM |
👍 |
Issue
#288
Details
Although direction of movement is different from options.direction, MC should fire 'release' event.
Preferred reviewers
@sculove, @netil, @mixed
@netil it's related with
eg.flicking