Input
Example#
Code-example#
<measmatic-grid>
<measmatic-card>
<measmatic-input data-id="0"></measmatic-input>
<measmatic-input data-id="1" label="label"></measmatic-input>
<measmatic-input data-id="2" unit="V" label="unit='V'"></measmatic-input>
<measmatic-input data-id="3" unit="V" start-prefix="G" label="GV-V"></measmatic-input>
<measmatic-input data-id="4" unit="V" end-prefix="n" label="V-nV"></measmatic-input>
<measmatic-input data-id="5" unit="V" start-prefix="G" end-prefix="n" label="GV-nV"></measmatic-input>
<measmatic-input data-id="6" selected-prefix="k" unit="V" start-prefix="G" end-prefix="n" label="GV-nV kV"></measmatic-input>
<measmatic-input data-id="7" type="text" value="zwölf" label="type=text"></measmatic-input>
<measmatic-input data-id="8" type="number" value="12" label="type=number"></measmatic-input>
<measmatic-input data-id="9" type="text" value="12" label="label=12"></measmatic-input>
<measmatic-input data-id="10" type="checkbox" label="type=checkbox"></measmatic-input>
<measmatic-input data-id="11" type="checkbox" checked label="checked"></measmatic-input>
<measmatic-input data-id="12" type="checkbox" checked></measmatic-input>
<measmatic-input data-id="13" type="file" label="File"></measmatic-input>
</measmatic-card>
</measmatic-grid>
Measmatic-input#
This custom-element will generate a control-element to input data and is based on HTMLInputElement. To organize Inputs you can use measmatic-card.
Structure
<measmatic-input data-id="controlId1" type="number" value="1" label="input number"></measmatic-input>
The HTML-structure is selfbuilding and editable by adding attributes.
Attributes
data-idrequired to initialize your control with measmatictypesupported types arenumber(=float),float(default),integer(blocks the use of units),text,file,andcheckbox(blocks the use of units and variables),integerlabelcreates a label at the left site of the control with the given attribute datacheckedcheckes control whentype=checkboxvaluepresets a value for controls with the type ofnumber,fileortextunitsets the baseunit and will activate the usage of measmatic-unitstart-prefixselects the largest choosable prefixend-prefixselects the smallest choosable prefixselected-prefixselected-prefix="" will select base (no prefix)variablescreates a button to look up given variables from your excisting tests (default = true)variables="false"will deactivate the variables button
Properties of interest
- to access setter/getter of contained childs
element.inputFieldreturns the contained measmatic-input-field elementelement.inputUnitreturns the contained measmatic-input-unit elementelement.inputVariablereturns the contained measmatic-input-variable element