[Bug] Form missing if bit size 0

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… :stuck_out_tongue:

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).

1 Like

Hi @Sebastian,

Thanks for reporting this. We’ll get it fixed. (In the meantime, you could get your project back to the default 1/8" bit by running EASEL.bitActions.setBitParams({bit: {width: 0.125, unit: 'in'}}))

By the way, have you seen that we’re hiring software engineers? :grin:

1 Like

Thx! There is one parentheses to much in your command :wink:
EASEL.bitActions.setBitParams({bit: {width: 0.125, unit: 'in'}})

The job offer looks great, but I live in Europe/Austria and can’t currently move to another country.

yes you right, my mistake :sweat:

This bug has been fixed. Thanks again for reporting it.

2 Likes