system decimal display

 From:  Michael Gibson
2445.2 In reply to 2445.1 
Hi Burr - normal input controls should respect your decimal place setting, like for instance when you are drawing a rectangle the width and height controls should use it, or when drawing a circle the radius value should use it.

However, that size control is a special case thing, it is a little different than those other controls since it needs to place 3 coordinate values all on the same line. Having a lot of decimal places on each value can tend to cause that line to get long enough for it not to fit in that area.

Here is an example showing the problem - here I have altered a bit of the sidepane.htm file to set 4 decimal places there:



Notice how the numbers have gotten pretty large now and there is not enough space to hold them all? The last number has gotten chopped off and can't be seen completely.

So that is the reason why the precision for those numbers is handled differently.

One thing you can do is to click on that line when you want to see more accurate values - when the "edit size" dropdown pops out, the controls on that are just one value per line and they by default have the precision set higher, to be 4 decimal places. So that can give you a way to view the higher precision with a click. (EDIT: oops, I just saw that you knew this already, sorry!)

If you'd like to alter the UI to have 4 decimal places in that area anyway despite that problem, you can do that with one tweak to your SidePane.htm file - find the script function formatSize(), and go to the last line of it (line #280 in SidePane.htm), which says this:

return moi.ui.formatCoordinate( number, precision );

Change that to this instead:

return moi.ui.formatCoordinate( number, -1 );


By changing that second parameter to -1, it will make that size entry area use your decimal precision setting, but you will probably run into the overflow problem. Maybe one way to tune that up though would be to remove the "Size:" label at the front - to do that go to SidePane.htm, line #401, which says:

var size = moi.ui.getText( 'Properties panel size label' ) + ' ';

and change that to

var size = "";


That will avoid putting that text "Size: " at the start of it, which will probably help to fit the longer values in there.

Hopefully those tweaks will get you set up the way you want?

- Michael