milsymbol 1.0.0
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.
Added
-
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 globalvar
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)
Changed
-
Global variable is now
ms
instead ofMS
. -
Feint/Dummy indicator drawn as specified in MIL-STD-2525D change 1.
Deprecated
-
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...)
Removed
-
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.
Fixed
- Fixed a bug that prevented specialHeadquarters to be drawn on Canvas output.