Search
Unit.percentage Method
See Also
 






Creates a Unit instance with the specified value and UnitType.Percent.

Namespace: MindFusion.Common
File: Unit.js

 Syntax

JavaScript  Copy Code

function percentage (value)

 Parameters

value

Number. The value of the unit.

 Return Value

Unit. The new Unit.

 Example

The following code uses the UnitType enumeration to check the type of a Unit value:

JavaScript  Copy Code

var m = MindFusion.Mapping;

var unit = new m.Unit();

if(unit.type == m.UnitType.Percent)
{
   var length = unit.value;
}

 See Also