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

panmove is not work when swipe first time in device of android #10

Open
Krishna25Vrinsoft opened this issue Jun 20, 2017 · 1 comment
Open

Comments

@Krishna25Vrinsoft
Copy link

Krishna25Vrinsoft commented Jun 20, 2017

I am facing issue with "panmove". when i swipe bottom to top and top to bottom its not work first time. I have used Hammerjs with backbonejs hybrid mobile app. I have make a bottom penal when it swipe we do some more option. but its not work properly. when i swipe second time it work fine. at first time i am not getting panmove event same thing i am getting in ios device.

this.$el.html("#div")
this.$el.hammer();
this.$el.data('hammer').get('pan').set({ threshold: 5 });
this.initHeight = -(this.$el.outerHeight() - this.$('.swiper-container').outerHeight());
this.estimateTopPosition = this.$el.position().top;

//This function call on panup, pandown, panstart, panmove, panend, pancancel, panright, panleft, tap, press event
fareContainerSwipe: function (e) {
	var swipeType = e.type;
	var speed = 500;
	console.log(e.type + ', ' + e.gesture.offsetDirection + ', ' + e.gesture.direction + ', ' + e.gesture.distance + ', deltaY: ' + e.gesture.deltaY);
	var distance = e.gesture.distance;
	var nav = this.$el;
	var transInitHeight = this.transInitHeight;
	var currentPosition = this.$el.position();
	
	
	var mDistance;

	if (swipeType == 'panmove' && (e.gesture.direction == 16)) { //Pan down

	}else if (swipeType == 'panmove' && e.gesture.direction == 8) {    //Pan up

	}
} 
@josdejong
Copy link
Owner

Can you create a jsbin or jsfiddle to demonstrate the issue? It's hard to guess what's going on exactly from the code snippet that you posted.

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

No branches or pull requests

2 participants