Giter Club home page Giter Club logo

Comments (1)

ploppynette avatar ploppynette commented on June 15, 2024

Hello,

Désolée je parle français.
J'avais le même souci.

J'ai apporté une modification dans le js au niveau de : elems navigation with mousewheel

le code vérifie si l’élément cible ou ses parents ont des barres de défilement.
Si c’est le cas, il ne déclenche pas l’événement switch_elem.
En conséquence, le scroll de la souris ne fonctionne pas lorsque le texte est caché (txt_hidden est true).

Modification sur la condition qui vérifie si l’élément cible ou ses parents ont des barres de défilement :
j'ai ajouté une condition supplémentaire pour vérifier si txt_hidden est true. Si c’est le cas, on force l’exécution de switch_elem.

`$(document).on('wheel', '#lcl_overlay, #lcl_window, #lcl_thumbs_nav:not(.lcl_tn_has_arr)', function(e) {
if(obj != lcl_curr_obj || !lcl_curr_opts.mousewheel) {return true;}
var $target = $(e.target);

// if not in window, do it!
if(!$target.is('#lcl_window') && !$target.parents('#lcl_window').length) {
	e.preventDefault();
	var delta = e.originalEvent.deltaY;
			
	if(delta > 0) 	{switch_elem('next');}
	else 			{switch_elem('prev');}	
}
		
else {
// cycle to know if parents have scrollers
var perform = true;
for(a=0; a<20; a++) {
if($target.is('#lcl_window')) {break;}
				
if($target[0].scrollHeight > $target.outerHeight() && !lcl_settings.txt_hidden) {
	perform = false;	
	break;
}
else {
	$target = $target.parent();	
	}
}
			
if(perform) {
	e.preventDefault();
	var delta = e.originalEvent.deltaY;
					
	if(delta > 0) 	{switch_elem('next');}
	else 			{switch_elem('prev');}	
	}
}

});
`

Dans mon cas, la modification a fonctionné.
Prudence quand même à d'autres éventuels effets secondaires.

LCweb-ita, au cas où, tu pourras confirmer si c'est correct ou pas ?

from lc-lightbox-lite.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.