stephan281094 / vue-drag-select

A Vue component for drag selecting elements. Inspired by react-drag-select.
75 stars 26 forks source link

Fix for logic error in onMouseDown() method #1

Closed antongorodezkiy closed 7 years ago

antongorodezkiy commented 7 years ago

Fix for logic error on onMouseDown() method

If I understood the idea correct, there should be && instead of ||, because with && I'm able to make it start selection on the items with selected-class

stephan281094 commented 7 years ago

Hi @antongorodezkiy. Thank you for the PR and apologies for the late response. The idea is to ignore all right clicks. By changing || into &&, it only ignores right clicks when clicking an item to be selected. Which is not what we want.

I added this.hasSelectorClass(event.target) to prevent starting the selection when clicking an item. Perhaps it's better to simply remove that part or by clarifying it by updating the comment. What do you think?

stephan281094 commented 7 years ago

Closing this as I've removed the hasSelectorClass check in 19c0ba0.