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

slide on click slideup #47

Open
maddack opened this issue Jan 15, 2020 · 1 comment
Open

slide on click slideup #47

maddack opened this issue Jan 15, 2020 · 1 comment

Comments

@maddack
Copy link

maddack commented Jan 15, 2020

great source
i have a question
Click on the slide to slide up.
I do not want this action.
What JavaScript should I fix?
Thanks
Warm Regards

@muscle-rabbit
Copy link

muscle-rabbit commented Sep 27, 2021

@maddack
I had a same issue.
I solved it by commenting out below.

// in bundle.js

var bindMouseDrag = function() {
	function isScrollable(element) {
		return element.parents( '.' + options.scrollabelArea ).length != 0 ;
	}
	var x, y;
	// window.onmousedown = function(e) {
	// 	var cancelOn = ['a','input','textarea','select'];
	// 	if( $.inArray( e.target.nodeName.toLowerCase(), cancelOn ) != -1 && isScrollable( $(e.target) ) ) {
	// 		cancel = true;
	// 	} else {
	// 		y = e.y;
	// 		cancel = false;
	// 	}
	// }
	window.onmouseup = function(e) {
		if( e.y > ( y+options.mouseSwipeDisance && !cancel ) ) {
			app.slideUp();
		} else if( e.y < ( y-options.mouseSwipeDisance && !cancel ) ) {
			app.slideDown();
		}
	}
};

FYI:
I found out the point that fire when mouse was down.
https://www.tutorialspoint.com/How-to-find-out-which-JavaScript-events-fired
I checked a whole mouse event in the debugger.

thanks.

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