Updating Settings
DragSelect is hyper customizable: all properties are optional, you can totally just pass an empty object and set the settings later.
setSettings
Any setting can be updated/added after the initialization by using the setSettings
method. Here is an example updating the area
and the selectables
:
const ds = new DragSelect({})
// And set any settings at any point in time
ds.setSettings({
selectables: document.getElementsByClassName('selectable-nodes'),
area: document.getElementById('area')
})
See the Settings page for a list of all possible options.