Skip to content
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

Merged
merged 5 commits into from
Jul 29, 2016

Conversation

jongmoon
Copy link
Contributor

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

Jongmoon Yoon added 2 commits July 12, 2016 15:38
fire release event when moved different direction that was set.

Ref naver#288
@jongmoon jongmoon self-assigned this Jul 12, 2016
@jongmoon jongmoon changed the title Movable coord#288 fix(MovableCoord): fire release event Jul 12, 2016
} 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);
Copy link
Contributor

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

Copy link
Contributor Author

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"*/) {
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I got it!

@sculove
Copy link
Contributor

sculove commented Jul 29, 2016

LGTM

@mixed
Copy link
Member

mixed commented Jul 29, 2016

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants