MCPcopy Create free account
hub / github.com/LearnBoost/drawback / getWH

Function getWH

plugins/flot/jquery.js:754–768  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

752 var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ];
753
754 function getWH() {
755 val = name == "width" ? elem.offsetWidth : elem.offsetHeight;
756
757 if ( extra === "border" )
758 return;
759
760 jQuery.each( which, function() {
761 if ( !extra )
762 val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
763 if ( extra === "margin" )
764 val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0;
765 else
766 val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
767 });
768 }
769
770 if ( elem.offsetWidth !== 0 )
771 getWH();

Callers 1

jquery.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected