function calculateObscuringAlpha(elmIndex, elmStack, originalElm) {
	var totalAlpha = 0;

	if (elmIndex > 0) {
		// there are elements above our element, check if they contribute to the background
		for (var i = elmIndex - 1; i >= 0; i--) {
			let bgElm = elmStack[i];
			let bgElmStyle = window.getComputedStyle(bgElm);
			let bgColor = color.getOwnBackgroundColor(bgElmStyle);
			if (bgColor.alpha && contentOverlapping(originalElm, bgElm)) {
				totalAlpha += bgColor.alpha;
			} else {
				// remove elements not contributing to the background
				elmStack.splice(i, 1);
			}
		}
	}
	return totalAlpha;
}
function calculateObscuringAlpha(elmIndex, elmStack, originalElm) {
	var totalAlpha = 0;

	if (elmIndex > 0) {
		// there are elements above our element, check if they contribute to the background
		for (var i = elmIndex - 1; i >= 0; i--) {
			let bgElm = elmStack[i];
			let bgElmStyle = window.getComputedStyle(bgElm);
			let bgColor = color.getOwnBackgroundColor(bgElmStyle);
			if (bgColor.alpha && contentOverlapping(originalElm, bgElm)) {
				totalAlpha += bgColor.alpha;
			} else {
				// remove elements not contributing to the background
				elmStack.splice(i, 1);
			}
		}
	}
	return totalAlpha;
}
function calculateObscuringAlpha ( elmIndex , elmStack , originalElm ) { var totalAlpha = 0 ; if ( elmIndex > 0 ) { // there are elements above our element, check if they contribute to the background for ( var i = elmIndex - 1 ; i >= 0 ; i -- ) { let bgElm = elmStack [ i ] ; let bgElmStyle = window . getComputedStyle ( bgElm ) ; let bgColor = color . getOwnBackgroundColor ( bgElmStyle ) ; if ( bgColor . alpha && contentOverlapping ( originalElm , bgElm ) ) { totalAlpha += bgColor . alpha ; } else { // remove elements not contributing to the background elmStack . splice ( i , 1 ) ; } } } return totalAlpha ; }
Calculate alpha transparency of a background element obscuring the current node
@private
@param {Number} elmIndex
@param {Array} elmStack
@param {Element} originalElm
@return {Number|undefined}
Calculate alpha transparency of a background element obscuring the current node
Calculate the alpha value of an element