function(toolKey){
			delete taTools[toolKey];
			angular.forEach(toolbars, function(toolbarScope){
				delete toolbarScope.tools[toolKey];
				for(var i = 0; i < toolbarScope.toolbar.length; i++){
					var toolbarIndex;
					for(var j = 0; j < toolbarScope.toolbar[i].length; j++){
						if(toolbarScope.toolbar[i][j] === toolKey){
							toolbarIndex = {
								group: i,
								index: j
							};
							break;
						}
						if(toolbarIndex !== undefined) break;
					}
					if(toolbarIndex !== undefined){
						toolbarScope.toolbar[toolbarIndex.group].slice(toolbarIndex.index, 1);
						toolbarScope._$element.children().eq(toolbarIndex.group).children().eq(toolbarIndex.index).remove();
					}
				}
			});
		}
function(toolKey){
			delete taTools[toolKey];
			angular.forEach(toolbars, function(toolbarScope){
				delete toolbarScope.tools[toolKey];
				for(var i = 0; i < toolbarScope.toolbar.length; i++){
					var toolbarIndex;
					for(var j = 0; j < toolbarScope.toolbar[i].length; j++){
						if(toolbarScope.toolbar[i][j] === toolKey){
							toolbarIndex = {
								group: i,
								index: j
							};
							break;
						}
						if(toolbarIndex !== undefined) break;
					}
					if(toolbarIndex !== undefined){
						toolbarScope.toolbar[toolbarIndex.group].slice(toolbarIndex.index, 1);
						toolbarScope._$element.children().eq(toolbarIndex.group).children().eq(toolbarIndex.index).remove();
					}
				}
			});
		}
function ( toolKey ) { delete taTools [ toolKey ] ; angular . forEach ( toolbars , function ( toolbarScope ) { delete toolbarScope . tools [ toolKey ] ; for ( var i = 0 ; i < toolbarScope . toolbar . length ; i ++ ) { var toolbarIndex ; for ( var j = 0 ; j < toolbarScope . toolbar [ i ] . length ; j ++ ) { if ( toolbarScope . toolbar [ i ] [ j ] === toolKey ) { toolbarIndex = { group : i , index : j } ; break ; } if ( toolbarIndex !== undefined ) break ; } if ( toolbarIndex !== undefined ) { toolbarScope . toolbar [ toolbarIndex . group ] . slice ( toolbarIndex . index , 1 ) ; toolbarScope . _$element . children ( ) . eq ( toolbarIndex . group ) . children ( ) . eq ( toolbarIndex . index ) . remove ( ) ; } } } ) ; }
removes a tool from all toolbars and it's definition
removes a tool from all toolbars and it s definition