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

added enableDragSelect option and made loopSelection true by default #126

Closed
wants to merge 1 commit into from
Closed

Conversation

mwise
Copy link
Contributor

@mwise mwise commented Feb 21, 2014

This PR adds an 'enableDragSelect' configuration option (true by default) that controls whether the click/drag-to-select functionality is enabled. I also made loopSelection true by default. This just seemed like the most useful configuration for most cases. Once you get used to the click-drag to highlight and loop a selection, it is hard to go back! I am open to @katspaugh's recommendation on what the default values for these options should be.

This isn't the most elegant solution to adding this feature. You'll see that I basically just return early in the various event handlers if enableDragSelect is not present. I think it would be marginally more performant to not even register those handlers if enableDragSelect is not true, but I am heading out of town for a week soon and wanted to at least get this option available. As it is, it seems to work fine.

Cheers,

Mark

katspaugh added a commit that referenced this pull request Feb 21, 2014
…gSelection; make loopSelection enabled by default
@katspaugh
Copy link
Owner

I've moved the option from each method into the method where all events are added. Thanks!

@katspaugh katspaugh closed this Feb 21, 2014
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

Successfully merging this pull request may close these issues.

None yet

2 participants