function _mouseDownDragHandler(e) {
        // record current mouse position
        _mouseX = e.clientX
        _mouseY = e.clientY

        // the progress bar being dragged
        _active = e.target

        // in case the user clicks on the progress bar and not the container
        if (!_active.className.includes('progress-bar'))
            _active = _active.parentElement

        // mouse listeners
        document.addEventListener('mousemove', _mouseMoveDragHandler)
        document.addEventListener('mouseup', _mouseUpDragHandler)
    }
/**
     * Helper EventListener for mouse down for dragging functionality.
     * Selects the clicked on progress bar as the active one for moving.
     * @param {event} e - mousedown event
     */
Helper EventListener for mouse down for dragging functionality.
Selects the clicked on progress bar as the active one for moving.
@param {event} e - mousedown event
Helper EventListener for mouse down for dragging functionality . Selects the clicked on progress bar as the active one for moving . @param { event } e - mousedown event
function _mouseDownDragHandler(e) {
        _mouseX = e.clientX
        _mouseY = e.clientY
        _active = e.target
        if (!_active.className.includes('progress-bar'))
            _active = _active.parentElement
        document.addEventListener('mousemove', _mouseMoveDragHandler)
        document.addEventListener('mouseup', _mouseUpDragHandler)
    }
function _mouseDownDragHandler ( e ) { _mouseX = e . clientX _mouseY = e . clientY _active = e . target if ( ! _active . className . includes ( 'progress-bar' ) ) _active = _active . parentElement document . addEventListener ( 'mousemove' , _mouseMoveDragHandler ) document . addEventListener ( 'mouseup' , _mouseUpDragHandler ) }
Helper EventListener for mouse down for dragging functionality.
Helper EventListener for mouse down for dragging functionality .
// record current mouse position // the progress bar being dragged // in case the user clicks on the progress bar and not the container // mouse listeners