multiple-selection.js
function mouseup(event) {
                    // Prevent default dragging of selected content
                    event.preventDefault();
                    // Remove helper
                    helper.remove();
                    // Change all selecting items to selected
                    var childs = getSelectableElements(element);

                    for (var i = 0; i < childs.length; i++) {
                        if (childs[i].scope().isSelecting === true) {
                            childs[i].scope().isSelecting = false;

                            childs[i].scope().isSelected = event.ctrlKey ? !childs[i].scope().isSelected : true;
                            childs[i].scope().$apply();
                        } else {
                            if (checkElementHitting(transformBox(childs[i].prop('offsetLeft'), childs[i].prop('offsetTop'), childs[i].prop('offsetLeft') + childs[i].prop('offsetWidth'), childs[i].prop('offsetTop') + childs[i].prop('offsetHeight')), transformBox(event.pageX, event.pageY, event.pageX, event.pageY))) {
                                if (childs[i].scope().isSelected === false) {
                                    childs[i].scope().isSelected = true;
                                    childs[i].scope().$apply();
                                }
                            }
                        }
                    }
                    // Remove listeners
                    $document.off('mousemove', mousemove);
                    $document.off('mouseup', mouseup);
                }
function mouseup(event) {
                    // Prevent default dragging of selected content
                    event.preventDefault();
                    // Remove helper
                    helper.remove();
                    // Change all selecting items to selected
                    var childs = getSelectableElements(element);

                    for (var i = 0; i < childs.length; i++) {
                        if (childs[i].scope().isSelecting === true) {
                            childs[i].scope().isSelecting = false;

                            childs[i].scope().isSelected = event.ctrlKey ? !childs[i].scope().isSelected : true;
                            childs[i].scope().$apply();
                        } else {
                            if (checkElementHitting(transformBox(childs[i].prop('offsetLeft'), childs[i].prop('offsetTop'), childs[i].prop('offsetLeft') + childs[i].prop('offsetWidth'), childs[i].prop('offsetTop') + childs[i].prop('offsetHeight')), transformBox(event.pageX, event.pageY, event.pageX, event.pageY))) {
                                if (childs[i].scope().isSelected === false) {
                                    childs[i].scope().isSelected = true;
                                    childs[i].scope().$apply();
                                }
                            }
                        }
                    }
                    // Remove listeners
                    $document.off('mousemove', mousemove);
                    $document.off('mouseup', mouseup);
                }
function mouseup ( event ) { // Prevent default dragging of selected content event . preventDefault ( ) ; // Remove helper helper . remove ( ) ; // Change all selecting items to selected var childs = getSelectableElements ( element ) ; for ( var i = 0 ; i < childs . length ; i ++ ) { if ( childs [ i ] . scope ( ) . isSelecting === true ) { childs [ i ] . scope ( ) . isSelecting = false ; childs [ i ] . scope ( ) . isSelected = event . ctrlKey ? ! childs [ i ] . scope ( ) . isSelected : true ; childs [ i ] . scope ( ) . $apply ( ) ; } else { if ( checkElementHitting ( transformBox ( childs [ i ] . prop ( 'offsetLeft' ) , childs [ i ] . prop ( 'offsetTop' ) , childs [ i ] . prop ( 'offsetLeft' ) + childs [ i ] . prop ( 'offsetWidth' ) , childs [ i ] . prop ( 'offsetTop' ) + childs [ i ] . prop ( 'offsetHeight' ) ) , transformBox ( event . pageX , event . pageY , event . pageX , event . pageY ) ) ) { if ( childs [ i ] . scope ( ) . isSelected === false ) { childs [ i ] . scope ( ) . isSelected = true ; childs [ i ] . scope ( ) . $apply ( ) ; } } } } // Remove listeners $document . off ( 'mousemove' , mousemove ) ; $document . off ( 'mouseup' , mouseup ) ; }
Event on Mouse up
@param  {Event} event
Event on Mouse up