skokenes / D3-Lasso-Plugin

A lasso selection tool for D3
BSD 3-Clause "New" or "Revised" License
79 stars 25 forks source link

Removing Call to Lasso #3

Open cfollow1 opened 9 years ago

cfollow1 commented 9 years ago

Hello. I am trying to figure out a way to turn off the lasso applied to an element. For something like zoom, I could write svg.on('.zoom',null), but the same approach applied to lasso does not seem to work. If it matters, I'm trying to make lasso toggleable, so that I can use mousedrag for multiple things in my program.

Thanks!

juba commented 8 years ago

I think you should be able to remove the lasso call by removing its on listeners :

selection.on(".dragstart", null);
selection.on(".drag", null);
selection.on(".dragend", null);

Please note that here selection must be equal to your area lasso parameter.