MCPcopy
hub / github.com/OscarGodson/EpicEditor / _outerWidth

Function _outerWidth

src/editor.js:85–94  ·  view source on GitHub ↗

* Gets an elements total width including it's borders and padding * @param {object} el The element to get the total width of * @returns {int}

(el)

Source from the content-addressed store, hash-verified

83 * @returns {int}
84 */
85 function _outerWidth(el) {
86 var b = parseInt(_getStyle(el, 'border-left-width'), 10) + parseInt(_getStyle(el, 'border-right-width'), 10)
87 , p = parseInt(_getStyle(el, 'padding-left'), 10) + parseInt(_getStyle(el, 'padding-right'), 10)
88 , w = el.offsetWidth
89 , t;
90 // For IE in case no border is set and it defaults to "medium"
91 if (isNaN(b)) { b = 0; }
92 t = b + p + w;
93 return t;
94 }
95
96 /**
97 * Gets an elements total height including it's borders and padding

Callers 1

editor.jsFile · 0.70

Calls 1

_getStyleFunction · 0.70

Tested by

no test coverage detected