MCPcopy Create free account
hub / github.com/TruthHun/BookStack / setPositiveNumber

Function setPositiveNumber

static/wangEditor/js/lib/jquery-2.2.1.js:5895–5905  ·  view source on GitHub ↗
( elem, value, subtract )

Source from the content-addressed store, hash-verified

5893}
5894
5895function setPositiveNumber( elem, value, subtract ) {
5896
5897 // Any relative (+/-) values have already been
5898 // normalized at this point
5899 var matches = rcssNum.exec( value );
5900 return matches ?
5901
5902 // Guard against undefined "subtract", e.g., when used as in cssHooks
5903 Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
5904 value;
5905}
5906
5907function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
5908 var i = extra === ( isBorderBox ? "border" : "content" ) ?

Callers 1

jquery-2.2.1.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected