app/static/js/main.js
// deletes selected box when delete key pressed
deletes selected box when delete key pressed
deletes selected box when delete key pressed
function deleteSelectedBox() {
    if (selectedBox) {
        scene.remove(selectedBox.points);
        scene.remove(selectedBox.boxHelper);
        deleteRow(selectedBox.id);
        for (var i = 0; i < hoverBoxes.length; i++) {
            if (hoverBoxes[i] == selectedBox) {
                hoverBoxes.splice(i, 1);
                break;
            }
        }
        for (var i = 0; i < boundingBoxes.length; i++) {
            if (boundingBoxes[i] == selectedBox) {
                boundingBoxes.splice(i, 1);
                break;
            }
        }
        evaluator.increment_delete_count();
        selectedBox = null;
    }
}
function deleteSelectedBox ( ) { if ( selectedBox ) { scene . remove ( selectedBox . points ) ; scene . remove ( selectedBox . boxHelper ) ; deleteRow ( selectedBox . id ) ; for ( var i = 0 ; i < hoverBoxes . length ; i ++ ) { if ( hoverBoxes [ i ] == selectedBox ) { hoverBoxes . splice ( i , 1 ) ; break ; } } for ( var i = 0 ; i < boundingBoxes . length ; i ++ ) { if ( boundingBoxes [ i ] == selectedBox ) { boundingBoxes . splice ( i , 1 ) ; break ; } } evaluator . increment_delete_count ( ) ; selectedBox = null ; } }
deletes selected box when delete key pressed
deletes selected box when delete key pressed
// deletes corresponding row in object id table // removes selected box from array of currently hovered boxes // removes selected box from array of bounding boxes // removes selected box