NREL / floorspace.js

Other
66 stars 35 forks source link

Change project::config::units #293

Closed macumber closed 6 years ago

macumber commented 6 years ago

enum should be 'ip' or 'si', default is 'ip', other default values in schema are evaluated in 'ip' units

macumber commented 6 years ago

If field has default and ip_units and si_units, assume default is in ip_units. If app is in si units, convert defaults from ip_units to si_units

shorowit commented 6 years ago

To be clear, you can "assume default is in ip_units" because the schema specifies the default as ip in Project>properties>units>default.

I imagine that the only complication will be the case when the user opens the app and immediately changes from ft to m, as there can be existing objects (e.g., stories) already defined whose properties would need to be updated.

Also note that beyond the ft<->m conversion, there is a lux<->fc conversion for illuminance.

shorowit commented 6 years ago

The change was made. We have a separate ticket for allowing the user to change the units on the fly -- https://github.com/NREL/floorspace.js/issues/169.