Skip to main content

With an Area

  • You can restrict DragSelect to only operate within a certain area
  • This Area will also be auto-scrollable by default

For example:

new DragSelect({
selectables: document.getElementsByClassName('selectable'),
area: document.getElementById('area'),
});

^ given this example you can only use the selection/drag inside of the container with the ID area.

Example

Try it out yourself: