Specifies a unit of measurement.
Namespace: MindFusion.Common
File: Unit.js
JavaScript Copy Code |
---|
// enum |
Member name | Value | Description | |
---|---|---|---|
Percent |
2 | The measurement is a percentage relative to the parent element. |
|
Pixel |
1 | The measurement is in pixels. |
The following code checks the type of the minWidth of a Window.
JavaScript Copy Code |
---|
if(window.minWidth.type === ui.UnitType.Percent ) { window.minWidth = ui.Unit.percent(50); } |