Hi,
I just accidentally entered 0 as my bit size in Easel and now I can’t change it back, since the form element is missing.
Looking through the js code I noticed that the function setBitWidth
of the EASEL.component.util.bitWidthInput
returns the bit size and unit, regardless if the passed width
parameter is 0
or undefinied
.
This shouldn’t happen, since the render
function of the EASEL.component.bitSelector
component checks the bit width in an if
statement, which causes the render
function to return null
. (Wouldn’t it be better to still render bit selection with a default value instead?)
This also happens if you enter a hex number like 0x3f
, which apperently is casted to 0, but that propably won’t happen to often…
One annoying thing I noticed though, is that the setBitWidth
function sets the unit of the bit size automatically to inch if the width
is below 0.125. That shouldn’t happen, since there are bits with a width of 0.1mm (engraving bits for example).