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.07k stars 84 forks source link

[Feature] Fixed height for selection box #32

Closed benwoodward closed 3 years ago

benwoodward commented 3 years ago

boundContainer is really useful, what I'd like is prop that builds on this functionality by allowing me to specify a fixed height. Meaning that dragging a selection only allows you to modify the width of a selection but not the height. What I'm using this for is to make it possible to create selections on a timeline, so I'm trying to recreate selection behaviour you might find in Final Cut or Premiere.

daybrush commented 3 years ago

@benwoodward

The boundContainer type was added.

boundContainer: {
   element: HTMLElement,
   left: true,
   top: true,
   bottom: true,
   right: true,
},
benwoodward commented 3 years ago

Thank you!