MCPcopy
hub / github.com/MrNothing/AI-Blocks / getDimensions

Function getDimensions

Sources/src/libs/jquery-ui.js:786–814  ·  view source on GitHub ↗
( elem )

Source from the content-addressed store, hash-verified

784}
785
786function getDimensions( elem ) {
787 var raw = elem[ 0 ];
788 if ( raw.nodeType === 9 ) {
789 return {
790 width: elem.width(),
791 height: elem.height(),
792 offset: { top: 0, left: 0 }
793 };
794 }
795 if ( $.isWindow( raw ) ) {
796 return {
797 width: elem.width(),
798 height: elem.height(),
799 offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
800 };
801 }
802 if ( raw.preventDefault ) {
803 return {
804 width: 0,
805 height: 0,
806 offset: { top: raw.pageY, left: raw.pageX }
807 };
808 }
809 return {
810 width: elem.outerWidth(),
811 height: elem.outerHeight(),
812 offset: elem.offset()
813 };
814}
815
816$.position = {
817 scrollbarWidth: function() {

Callers 1

jquery-ui.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected