MCPcopy Index your code
hub / github.com/jquery/jquery / setPositiveNumber

Function setPositiveNumber

src/css.js:27–37  ·  view source on GitHub ↗
( _elem, value, subtract )

Source from the content-addressed store, hash-verified

25 };
26
27function setPositiveNumber( _elem, value, subtract ) {
28
29 // Any relative (+/-) values have already been
30 // normalized at this point
31 var matches = rcssNum.exec( value );
32 return matches ?
33
34 // Guard against undefined "subtract", e.g., when used as in cssHooks
35 Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
36 value;
37}
38
39function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
40 var i = dimension === "width" ? 1 : 0,

Callers 1

css.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected