-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
added: new functionality to be able to create a drag-handle #31
Conversation
Sorry.. but I'm not that good with Git so needed to make a new PR. Made the changes like you asked. |
@@ -479,6 +480,12 @@ | |||
* @param event {Object} event object | |||
*/ | |||
mousedown: function (event) { | |||
if (finalParams.dragHandleCssClass && |
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.
if (finalParams.dragHandleCssClass &&
(typeof finalParams.dragHandleCssClass !== 'string' ||
!event.target.classList.contains(finalParams.dragHandleCssClass))) {
return false;
}
Sorry.. but I don't get this stupid Git, I make the change you suggest on my local branch, Really don't know what I'm doing wrong. |
@@ -481,8 +481,8 @@ | |||
*/ | |||
mousedown: function (event) { | |||
if (finalParams.dragHandleCssClass && | |||
typeof finalParams.dragHandleCssClass === 'string' && | |||
!event.target.classList.contains(finalParams.dragHandleCssClass)) { | |||
(typeof finalParams.dragHandleCssClass === 'string' || |
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.
typeof finalParams.dragHandleCssClass !== 'string'
Fixed, my bad. |
@Webtrix Thank you for your commitment |
Just a really simple addition, so a drag handle can be created. Only when the mouse down event happend on this
element
the dragging will fire.