MCPcopy
hub / github.com/Semantic-Org/Semantic-UI / getMaxElement

Function getMaxElement

examples/assets/library/iframe-content.js:724–747  ·  view source on GitHub ↗
(side,elements)

Source from the content-addressed store, hash-verified

722
723 //Idea from https://github.com/guardian/iframe-messenger
724 function getMaxElement(side,elements) {
725 var
726 elementsLength = elements.length,
727 elVal = 0,
728 maxVal = 0,
729 Side = capitalizeFirstLetter(side),
730 timer = getNow();
731
732 for (var i = 0; i < elementsLength; i++) {
733 elVal = elements[i].getBoundingClientRect()[side] + getComputedStyle('margin'+Side,elements[i]);
734 if (elVal > maxVal) {
735 maxVal = elVal;
736 }
737 }
738
739 timer = getNow() - timer;
740
741 log('Parsed '+elementsLength+' HTML elements');
742 log('Element position calculated in ' + timer + 'ms');
743
744 chkEventThottle(timer);
745
746 return maxVal;
747 }
748
749 function getAllMeasurements(dimention) {
750 return [

Callers 2

getTaggedElementsFunction · 0.85
iframe-content.jsFile · 0.85

Calls 4

capitalizeFirstLetterFunction · 0.85
getComputedStyleFunction · 0.85
chkEventThottleFunction · 0.85
logFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…