Class core.CSSUnits
Defined in: CSSUnits.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
convert(value, oldUnit, newUnit)
Takes a number of an oldUnit and returns its value in newUnit
|
|
convertMeasure(measure, newUnit)
Takes a measure such as "2cm" and returns it's measurement in the new unit, e.g.
|
|
getUnits(measure)
|
Method Detail
{!number}
convert(value, oldUnit, newUnit)
Takes a number of an oldUnit and returns its value in newUnit
- Parameters:
- {!number} value
- {!string} oldUnit
- {!string} newUnit
- Returns:
- {!number}
{!number|undefined}
convertMeasure(measure, newUnit)
Takes a measure such as "2cm" and returns it's measurement in the new unit, e.g. 20
- Parameters:
- {!string} measure
- {!string} newUnit
- Returns:
- {!number|undefined}
{!string}
getUnits(measure)
- Parameters:
- {!string} measure
- Returns:
- {!string}