Skip to content

Input unit

Example#

preview

Code-example#

<measmatic-input-unit data-id="controlId1"></measmatic-input-unit>
<measmatic-input-unit data-id="controlId2" unit="V"></measmatic-input-unit>
<measmatic-input-unit data-id="controlId2" unit="V" start-prefix="" end-prefix=""></measmatic-input-unit>
<measmatic-input-unit data-id="controlId3" unit="V" start-prefix="k"></measmatic-input-unit>
<measmatic-input-unit data-id="controlId4" unit="V" end-prefix="p"></measmatic-input-unit>
<measmatic-input-unit data-id="controlId5" unit="V" start-prefix="M" end-prefix="p"></measmatic-input-unit>
<measmatic-input-unit data-id="controlId6" unit="V" start-prefix="M" end-prefix="p" selected-prefix="k"></measmatic-input-unit>

Measmatic-input-unit#

This element will generate a select-element to select a unit. Predefinded prefixes going from high to low: 'Y','Z','E','P',"T","G","M","k","","m","ยต","n","p","f","a","z","y". "" will use no prefix and presents the baseunit.


Attributes

  • data-id required to initialize your control with measmatic
  • unit sets the baseunit
  • start-prefix selects the largest choosable prefix
  • end-prefix selects the smallest choosable prefix
  • selected-prefix selected-prefix="" will select base (no prefix)

Setter/Getter

  • unit sets/gets baseunit of element
  • selectedPrefix sets/gets selected prefix of unit
  • startPrefix sets/gets smallest prefix of unit
  • endPrefix sets/gets largest prefix of unit
  • disabled sets/gets element disabled