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
2.04k stars 82 forks source link

Is it possible to only allow selection on the border of the target? #119

Closed quinn280 closed 1 year ago

quinn280 commented 1 year ago

Environments

Description

Is it possible to only allow selection on the border of the target, and not the center?

My ultimate goal is to have draggable items inside of a resizable box. selecto

My problem right now is that when a user clicks anywhere in the center of the box, it becomes selected.

daybrush commented 1 year ago

@quinn280

Try making selectableTargets the box's selector.

selectableTargets={".target.box"}

Let me know if you have any additional specs.