Closed kjellmf closed 6 years ago
I was considering this, but at the moment I wanted to keep it as closely as possible as the data is written in the standards. Also at the moment I just wanted to break out this code from milsymbol but make as few changes as possible to the code, so for the moment I will keep the data as it is, but it might change in the future.
This is now fixed in the two repositories that replaces this: https://github.com/spatialillusions/mil-std-2525 https://github.com/spatialillusions/stanag-app6
In JS you can access an object property using bracket notation or dot notation
obj['foo']
vsobj.foo
. In order to use the dot notation the property name has to be a valid JS identifier name (no spaces etc.).In the symbology data you provide you use property names like
main icon
,entity type
,modifier 1
. This means that we have to use the bracket notation:If you change the property names to be valid identifier names you allow a more compact syntax:
An additional benefit is that the dot notation plays more nicely with auto completion in editors (especially if you provide typings).
Just an idea. Thanks for providing the data!