# Module: ol/interaction/DragBox

This documentation is for OpenLayers v10.9.0. The latest is v.

## ol/interaction/DragBox

### Classes

DragBoxEvent
DragBox

### Type Definitions

#### EndCondition()

interaction/DragBox.js, line 10

  A function that takes a `MapBrowserEvent` and two `Pixel`s and returns a `{boolean}`. If the condition is met, true should be returned.

#### Options{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `className` | string (defaults to 'ol-dragbox') | CSS class name for styling the box.
  `condition` | Condition | undefined | A function that takes a `MapBrowserEvent` and returns a boolean to indicate whether that event should be handled. Default is `ol/events/condition~mouseActionButton`.
  `minArea` | number (defaults to 64) | The minimum area of the box in pixel, this value is used by the default `boxEndCondition` function.
  `boxEndCondition` | EndCondition | undefined | A function that takes a `MapBrowserEvent` and two `Pixel`s to indicate whether a `boxend` event should be fired. Default is `true` if the area of the box is bigger than the `minArea` option.
  `onBoxEnd` | function | undefined | Code to execute just before `boxend` is fired.