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

moveTo without animation #6

Open
ghost opened this issue Nov 7, 2017 · 2 comments
Open

moveTo without animation #6

ghost opened this issue Nov 7, 2017 · 2 comments
Labels

Comments

@ghost
Copy link

ghost commented Nov 7, 2017

When animation is set to false in moveTo() then there is no action in

            addEventListener(el, 'webkitTransitionEnd', function () {
                _this2.toogleAnimate(_this2.curIndex);
                _this2.opts.afterChange.call(_this2, _this2.pageEles[_this2.curIndex], _this2.curIndex);
                _this2.opts.movingFlag = false;
            });

which mean movingFlag is still set to true and it's returning from mousemove on the begining of action.
I propose to add that.opts.movingFlag = false; to mouseup. Then it works fine but I didn't analize all code.

 addEventListener(el, 'mouseup', function (e) {
                    isMousedown = false;
                    that.opts.movingFlag = false;
                });
@abel-oye
Copy link
Owner

abel-oye commented Nov 8, 2017

thx
The "movingFlag" will only be "true" if it's actually moved."Mouseup" does not necessarily call ”move“.
webkitTransitionEnd has been executed, but move hasn't been executed yet. So I also think that webkitTransitionEnd controls what I don't think is the best approach

@chas125
Copy link

chas125 commented Nov 15, 2017

webkitTransitionEnd will not be triggered sometimes in WeChat (Android 7.1) , and then the page is frozen.
I'd set the movingFlag to true in function 'moveTo' and worked well

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

No branches or pull requests

2 participants