-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Fotorama - disabling swipe on the item with class "disableSwipe" #22089
Fotorama - disabling swipe on the item with class "disableSwipe" #22089
Conversation
Hi @iGerchak. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
lib/web/fotorama/fotorama.js
Outdated
@@ -1441,6 +1443,13 @@ fotoramaVersion = '4.6.4'; | |||
return; | |||
} | |||
|
|||
$target = $(e.target); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like $target was never declared. Also if it used only once - it’s better to inline it’s value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$target was declared in the parent function.
Fixed.
Hi @ihor-sviziev, thank you for the review. |
✔️ QA passed |
Hi @iGerchak, thank you for your contribution! |
Description
This fix adds the ability to disable swipe on the item.
For example canvas where you can draw something. Currently, we can't interactive with it because when we try to rotate an object, fotorama will slide to the next image.
This fix will check the active element and if it has "disableSwipe" class, it disables swipe and we'll interact with this element.