Changelog
1.3.0 21 AUG 2017
symbol.getOptions(includeStyle) will return the options that are set on the symbol.
symbol.getStyle() will return the style options that are set on the symbol.
Added files for intellisense when used in Visual Studio Code
Options and Style are now stored in separate Objects on the symbol for better structure.
ms.Symbol and setOptions can now take any number of arguments from 0 to n.
ArcGIS example had to be updated because of change of how Options and Style are stored.
monoColor was initialized as false
instead of an empty string, this is now
corrected and makes the correct status modifiers to be used by default.
10031000001104000000 was drawn with an icon IW instead of IO (Since it is IW in 2525C, but that is now fiexed.)
Fixed the size of the sensor icon used in 2525D
Changelog
1.2.1 12 JUN 2017
Altitude/Depth was sometimes not labeled on 2525D symbols
Typo in Changelog
Changelog
1.2.0 11 JUN 2017
npm run build-amd
isValid(option) can now take an bolean input that makes it return a validaton object with extended information about the vadility.
isValid now validates the mobility modifier as well as the symbol icon.
Updated ENERGY FACITILIES INFRASTRUCTURE to better representation of the standard.
The quantiy field would be cut if the content was wider than the symbol, this is now fixed so that the symbol size adopts to to width of the quantity field.
Fixed Land Unit M1 10 command and control that was displayed in as a Y instead of C2.
Some modifiers on Signals Intelligence symbols in 2525C was incorrect
Changelog
1.1.0 16 APR 2017
I would like to thank @okwolf that has contributed with unit tests and some code reorganization.
It is now possible to use sidc
or SIDC
in an options object.
It is now possible to initiate a symbol with just an options object
ms.Symbol({options})
.
ms.Symbol().isValid() now returns a boolean representing if it was possible to find the symbol icon for the provided SIDC.
The source code for the unit generator is now provided in the dev folder.
Added 2525B symbols that are missing in 2525C, so now we have full support for 2525B as well.
Initial unit tests added to the repository.
Fix for that tactical points with labels with large font sizes might draw too narrow so that part of the label can't be seen.
Fix for that units with invalid icon part in the SIDC did not get the upside down question mark when canvas output was used.
G-F-PTS--- TACGRP.FSUPP.PNT.TGT.PTGT and G-C-FSTP-- 2.X.2.3.1.1.1 POINT/SINGLE TARGET now uses altitudeDepth instead of additionalInformation1 to display the target altitude.
Made sure that tactical points that dosen't have labels in the specifications don't get labels even if they are set.
Changelog
1.0.0 03 MAR 2017
Milsymbol is now split into several modules and built with webpack, this makes the code easier to maintain.
Avoid getting and setting properties directly, use methods for this when they are available, in the future properties might change names.
colorMode property can now be set to a string representing the name of a registered color mode.
symbol.getSize() returns an object with the width and height of the symbol.
symbol.getAnchor() returns an object with the x and y offset of the symbol.
symbol.getOctagonAnchor() returns an object with the x and y offset of the octagon center.
bbox.merge(another-bbox), use this instead of MS.bboxMax for merging bounding boxes.
Milsymbol can now be used as a AMD/CommonJS/etc... module, by requiering
milsymbol
, the global var
is called ms.
ms.getVersion() that returns the version as a string.
ms.addSIDCicons(sidcFunction, type) for adding sidc functions.
ms.addLabelOverrides(labelFunction, type) for adding label functions.
ms.addSymbolPart(part) should be used instead of MS.addMarkerParts(part)
ms.getSymbolParts() should be used instead of MS.getMarkerParts()
ms.setSymbolParts(parts) should be used instead of MS.setMarkerParts(parts)
ms.BBox() should be used instead of MS.bbox(). (Since it is a class...)
ms.ColorMode() should be used instead of MS.colorMode(). (Since it is a class...)
ms.Symbol() should be used instead of MS.symbol(). (Since it is a class...)
Tactical points is now part of /dist/milsymbol.js, no need to include any extra files.
Tactical points now supports APP6-B ANNEX E.
Symbols with an invalid icon in the SIDC will now be rendered with an upside down ?. (According to MIL-STD-2525D)
Global variable is now ms
instead of MS
.
Feint/Dummy indicator drawn as specified in MIL-STD-2525D change 1.
Avoid setting properties directly, use setOptions(options) instead.
Do not use .XML anymore, use asSVG() instead, if needed set ms.autoSVG = true
. ms.autoSVG will be removed in a future version.
getMarker(), it's not needed anymore, symbols are automatically updated when options are updated using setOptions().
MS.bboxMax(), use bbox.merge() instead.
MS.addLetterSIDCicons(), use ms.addSIDCicons() instead.
MS.addNumberSIDCicons(), use ms.addSIDCicons() instead.
MS.addLetterLabelOverrides(), use ms.addLabelOverrides() instead.
MS.addNumberLabelOverrides(), use ms.addLabelOverrides() instead.
MS.buildingBlock() return an object instead.
MS.addMarkerParts(part) use ms.addSymbolPart(part) instead.
MS.getMarkerParts() use ms.getSymbolParts() instead.
MS.setMarkerParts(parts) use ms.setSymbolParts(parts) instead.
MS.bbox() use ms.BBox() instead. (Since it is a class...)
MS.colorMode() use ms.ColorMode() instead. (Since it is a class...)
MS.symbol() use ms.Symbol instead. (Since it is a class...)
MS.rotate() has been removed, use json drawInstruction instead.
MS.scale() has been removed, use json drawInstruction instead.
MS.translate() has been removed, use json drawInstruction instead.
Changelog
0.6.0 25 DEC 2016
Support for outlines on symbols using properties outlineColor
and
outlineWidth
.
toDataURL() that returns a base 64 encoding of the SVG symbol. (See deprication of asImage())
Possibility to Add/Update existing SIDC.
Possibility to Add/Update the icon parts that constructs the icons.
Support for tactical point symbols in MIL-STD-2525C.
Changelog
0.5.6 14 MAY 2016
Changelog
0.5.5 13 JAN 2016
Changelog
0.5.1 24 JUL 2015
Changelog
0.5.0 - 20 JUL 2015