daybrush / selecto

Selecto.js is a component that allows you to select elements in the drag area using the mouse or touch.

Home Page:https://daybrush.com/selecto

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Drag using Moveable on select by Selecto

IanDuncanson opened this issue · comments

Environments

  • Framework name: React
  • Framework version: 18.2.0
  • Component name: react-selecto
  • Component version: 1.26.3
  • Testable Address(optional):

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.