daybrush / selecto

Selecto.js is a component that allows you to select elements in the drag area using the mouse or touch.
https://daybrush.com/selecto
MIT License
2k stars 81 forks source link

Drag using Moveable on select by Selecto #170

Open IanDuncanson opened 2 months ago

IanDuncanson commented 2 months ago

Environments

Description

I am using react-selecto as well as react-moveable, works beautifully, except one use case I can't seem to get the right combination of options of the two libraries to achieve, which is similar to draw.io

On Selecto, I have selectByClick as true, selectFromInside as false and hitRate as 100.

The end result I am after is if I click and drag starting outside any selectable element, selecto goes into its drag select "rubber band" mode, selecting things within its bounds, but if I mouse down within a selectable element it is selected and I can immediately start dragging using moveable. At the moment, I need to mouse up and down (click) the element and then drag as a separate action.