Comparing version 2.0.0 to 2.1.0
@@ -5,4 +5,3 @@ module.exports = { | ||
browser: true, | ||
commonjs: true, | ||
jest: true | ||
commonjs: true | ||
}, | ||
@@ -9,0 +8,0 @@ parserOptions: { |
# Contributing | ||
I welcome contributions from anyone and everyone. If you want to make any major changes please open an issue first, but for small changes you can simply create a pull. | ||
I welcome contributions from anyone and everyone. If you want to make any major changes please open an issue first, but for small changes you can simply create a pull. | ||
@@ -16,6 +16,6 @@ Before you make an contribution, please read GitHub Terms of Service: (Everything works as you think it works, but just make sure that you have the right to contribute the code you want to hand over.) | ||
During development the code can be built by running `npm run build-dev`, before committing your code you should run `npm run build`, this will format all code with prettier, run the tests, and build your code. | ||
During development the code can be built by running `npm run build`. This will format all code with prettier, run the tests, and build your code. | ||
## Examples | ||
If you would like to contribute with examples of milsymbol usage, please create them in the same structure as bl.ocks use, and include a preview.png with the size 960*500px. https://bl.ocks.org/-/about | ||
If you would like to contribute with examples of milsymbol usage, please create them in the same structure as bl.ocks use, and include a preview.png with the size 960\*500px. https://bl.ocks.org/-/about |
# Milsymbol Documentation | ||
## Installning | ||
## Installing | ||
@@ -56,3 +56,3 @@ You can download the latest release directly from GitHub if you want to: | ||
object can be updated or added after that the symbol object is created. The | ||
symbol object also has methods to provide the symbol in different formats, and | ||
symbol object also has methods to provide the symbol in different formats and | ||
to provide information about the created symbol. | ||
@@ -79,4 +79,4 @@ | ||
Once you have initiated your symbol, you can use different methods to request a | ||
rendering of the symbol, or get information about the symbol. It is also | ||
Once you have initiated your symbol, you can use different methods to request | ||
rendering of the symbol or get information about the symbol. It is also | ||
possible to chain methods directly to the initiation: | ||
@@ -142,11 +142,11 @@ | ||
| -------------------- | ------------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| alternateMedal | Boolean | false | MIL-STD-2525D lets you choose between MEDAL and alternate MEDAL icons for mine warefare symbols, the default in milsymbol is using MEDAL icons, but you can change this using setting this property to true. | | ||
| civilianColor | Boolean | true | 2525C specifics purple as an optional color for civilian symbols. Of corse we like color so we set this as default. | | ||
| colorMode | ColorMode or String | 'Light' | This is the option for setting what Color object to use for the fill of the symbols. It can be set to a Color object, or a string representing the name of a registered Color object. You can use ms.ColorMode to create a new color mode, or ms.getColorMode to get an existing color mode. **Note that the string is not a single color, it is a name of a registred color mode**, by default "Light", "Medium", and "Dark" are registred color modes. | | ||
| alternateMedal | Boolean | false | MIL-STD-2525D lets you choose between MEDAL and alternate MEDAL icons for mine warfare symbols, the default in milsymbol is using MEDAL icons, but you can change this using setting this property to true. | | ||
| civilianColor | Boolean | true | 2525C specifics purple as an optional color for civilian symbols. Of course we like color so we set this as default. | | ||
| colorMode | ColorMode or String | 'Light' | This is the option for setting what Color object to use for the fill of the symbols. It can be set to a Color object, or a string representing the name of a registered Color object. You can use ms.ColorMode to create a new color mode, or ms.getColorMode to get an existing color mode. **Note that the string is not a single color, it is a name of a registered color mode**, by default "Light", "Medium", and "Dark" are registered color modes. | | ||
| fill | Boolean | true | Should your symbol be filled with color. | | ||
| fillOpacity | Number | 1 | The opacity of the symbol fill color. | | ||
| fontfamily | String | 'Arial' | Changes the font familiy for all texts surrounding the icon. | | ||
| fontfamily | String | 'Arial' | Changes the font family for all texts surrounding the icon. | | ||
| frame | Boolean | true | Should your symbol have a frame. All symbols support to be unframed, not just the ones specified in 2525B. | | ||
| frameColor | ColorMode | false | Changes the color of the frame of the symbol | | ||
| hqStaffLength | Number | undefined | Overrides the global Headquarters staf length | | ||
| hqStaffLength | Number | undefined | Overrides the global Headquarters staff length | | ||
| icon | Boolean | true | Should your symbol have an icon. | | ||
@@ -158,10 +158,12 @@ | infoBackground | ColorMode or String | "" | Changes the color of the information background | | ||
| infoFields | Boolean | true | If you have set some text fields and direction but don't want them to be displayed you can set infoFields to false. This makes it possible to initiate the object with all information you got but not display it. | | ||
| infoOutlineColor | String or `false` | rgb(239, 239, 239) | The color of the outline that should be drawn around text fields, or `false` to use the value of `outlineColor`. | | ||
| infoOutlineWidth | Number or `false` | false | The width of the outline that should be drawn around text fields, or `false` to use the value of `outlineWidth`. | | ||
| infoSize | Number | 40 | The size of the text fields surrounding the symbol. This is relative to the size of the symbol, so you can consider 40 to be 40% of the default size that is 100. | | ||
| monoColor | String | '' | A color that is either a keyword or a numerical RGB specification. If you set this the symbol will be monochrome and unfilled using the color provided. | | ||
| outlineColor | ColorMode or String | rgb(239, 239, 239) | A color that is either a keyword or a numerical RGB specification. The color of the outline of the symbol, if any. Defaults to an off-white color. | | ||
| outlineWidth | Number | 0 | The width of the outline of the symbol, if any. | | ||
| padding | Number | 0 | Milsymbol usually tries to fit the bounds for the symbol as snugg as possible, but in some cases you want to add some extra padding around your symbol, then simply set this option to any number. | | ||
| outlineWidth | Number | 0 | The width of the outline that should be drawn around all symbol parts, if any. | | ||
| padding | Number | 0 | Milsymbol usually tries to fit the bounds for the symbol as snug as possible, but in some cases you want to add some extra padding around your symbol, then simply set this option to any number. | | ||
| size | Number | 100 | The L value for your symbol, where the L value is the width of the icon octagon. | | ||
| simpleStatusModifier | Boolean | false | Should the symbol use simplified status modifiers, this is default for unfilled symbols and can be forced for filled symbols using this option. | | ||
| standard | String | '' | This is a way to override the default standard set for milsymbol. You can set this variable to "2525" or "APP6" dependeing on what standard you prefer. | | ||
| simpleStatusModifier | Boolean | false | Should the symbol use simplified status modifiers, this is the default for unfilled symbols and can be forced for filled symbols using this option. | | ||
| standard | String | '' | This is a way to override the default standard set for milsymbol. You can set this variable to "2525" or "APP6" depending on what standard you prefer. | | ||
| square | Boolean | false | Should the symbol be square with the insertion point in the center. | | ||
@@ -181,3 +183,3 @@ | strokeWidth | Number | 3 | The stroke width of the symbol. | | ||
Returns the symbol as a Canvas Element. It is possible to provide a resolution | ||
factor if a symbol symbol with a higher resolution is wanted, this won't effect | ||
factor if a symbol with a higher resolution is wanted, this won't affect | ||
numbers reported by `getSize()`, `getAnchor()` or `getOctagonAnchor()`. | ||
@@ -219,3 +221,3 @@ | ||
Getting the anchor point where symbol should be inserted measured from the top | ||
Getting the anchor point where the symbol should be inserted measured from the top | ||
left corner of the symbol. | ||
@@ -239,9 +241,9 @@ | ||
Object { | ||
black: String, // Black parts of the symbol. | ||
fillColor: String, // Symbol fill color. | ||
frameColor: String, // Symbol frame color. | ||
iconColor: String, // Icon color. | ||
iconFillColor: String, // Icon fill color. | ||
none: String, // Transparent parts of the symbol. | ||
white: String // White parts of the symbol. | ||
black: ColorMode, // Black parts of the symbol. | ||
fillColor: ColorMode, // Symbol fill color. | ||
frameColor: ColorMode, // Symbol frame color. | ||
iconColor: ColorMode, // Icon color. | ||
iconFillColor: ColorMode, // Icon fill color. | ||
none: ColorMode, // Transparent parts of the symbol. | ||
white: ColorMode // White parts of the symbol. | ||
} | ||
@@ -254,3 +256,3 @@ ``` | ||
Gets all metadata that are computed for the SIDC of this symbol. | ||
Gets all metadata that is computed for the SIDC of this symbol. | ||
@@ -292,4 +294,4 @@ **Returns** | ||
Get the options that is set on the symbol. If includeStyle is set to `false` | ||
style information will not be included in the returned options, if it is set to | ||
Get the options that are set on the symbol. If includeStyle is set to `false` | ||
style information will not be included in the returned options if it is set to | ||
`true` or left out style information will be included in the returned options. | ||
@@ -347,3 +349,3 @@ | ||
will return a boolean representing if it was possible to find an icon for the | ||
provided SIDC or not. In the future this might validate other parameters as | ||
provided SIDC or not. In the future, this might validate other parameters as | ||
well. | ||
@@ -438,3 +440,3 @@ | ||
The symbols in milsymbol is drawn using JSON draw instructions | ||
The symbols in milsymbol are drawn using JSON draw instructions | ||
`drawInstruction`, these are then converted into Canvas draw instructions, or | ||
@@ -604,9 +606,9 @@ SVG output. | ||
Adds an icon function to milsymbol. All icons on the symbols in milsymbol is | ||
Adds an icon function to milsymbol. All icons on the symbols in milsymbol are | ||
built by different icon parts, it can be one for Infantry and one for Armor, add | ||
them together and you will have the icon for Armored Infantry. By reusing icon | ||
parts as much as possible the the size of milsymbol is reduced. | ||
parts as much as possible the size of milsymbol is reduced. | ||
If you want to override built in icon parts, or add new to use with custom SIDC, | ||
you can do this by adding a icon function. | ||
If you want to override built-in icon parts or add new to use with custom SIDC, | ||
you can do this by adding an icon function. | ||
@@ -626,3 +628,3 @@ Example: | ||
iconParts: Object - The existing object of icon parts | ||
metadata: Object - propterties object | ||
metadata: Object - properties object | ||
colors: Object - color object | ||
@@ -657,3 +659,3 @@ std2525: Boolean - Is it 2525 then true, otherwise false | ||
labelFunction: Function, | ||
type: String // 'letter' or 'number' depending of the type of the SIDC | ||
type: String // 'letter' or 'number' depending on the type of the SIDC | ||
``` | ||
@@ -663,3 +665,3 @@ | ||
have labels that differ from how ordinary symbols are labeled, such as tactical | ||
graphics, you can add label override functions that places the labels | ||
graphics, you can add label override functions that place the labels | ||
differently. | ||
@@ -725,3 +727,3 @@ | ||
sidcFunction: Function, | ||
type: String // 'letter' or 'number' depending of the type of the SIDC | ||
type: String // 'letter' or 'number' depending on the type on the SIDC | ||
``` | ||
@@ -783,3 +785,3 @@ | ||
By inserting a pre and a post drawInstruction, we are able to to draw parts of | ||
By inserting a pre and a post drawInstruction, we are able to draw parts of | ||
the symbol that requires information, such as bounding boxes, previously drawn, | ||
@@ -797,7 +799,7 @@ but to draw them before the other parts are drawn. It's quite clever, trust me. | ||
```javascript | ||
mode: String; // Name of a color mode registred with setColorMode | ||
mode: String; // Name of a color mode registered with setColorMode | ||
``` | ||
Gets a color mode that has been registred with `setColorMode`. When milsymbol is | ||
initiated the following color modes are registred automatically: | ||
Gets a color mode that has been registered with `setColorMode`. When milsymbol is | ||
initiated the following color modes are registered automatically: | ||
@@ -830,3 +832,3 @@ | Color mode name | Description | | ||
Gets the diffrent dash arrays used for dashed lines. | ||
Gets the different dash arrays used for dashed lines. | ||
@@ -838,3 +840,3 @@ **Returns** | ||
pending: String, // The value for the stroke-dasharray used for symbols with a pending status. | ||
anticipated: String, // The value for the stroke-dasharray used for symbols with a anticipated status. | ||
anticipated: String, // The value for the stroke-dasharray used for symbols with an anticipated status. | ||
feintDummy: String // The value for the stroke-dasharray used for the feint/dummy modifier. | ||
@@ -846,3 +848,3 @@ } | ||
Gets the length of the HQ staf used for HQ symbols. | ||
Gets the length of the HQ staff used for HQ symbols. | ||
@@ -857,3 +859,3 @@ **Returns** | ||
This gets all symbol functions that has been inserted by `ms.addSymbolPart`. | ||
This gets all symbol functions that have been inserted by `ms.addSymbolPart`. | ||
@@ -921,3 +923,3 @@ **Returns** | ||
pending: String, // The value for the stroke-dasharray used for symbols with a pending status. | ||
anticipated: String, // The value for the stroke-dasharray used for symbols with a anticipated status. | ||
anticipated: String, // The value for the stroke-dasharray used for symbols with an anticipated status. | ||
feintDummy: String // The value for the stroke-dasharray used for the feint/dummy modifier. | ||
@@ -950,3 +952,3 @@ ``` | ||
Sets the length of the HQ staf used for HQ symbols. | ||
Sets the length of the HQ staff used for HQ symbols. | ||
@@ -953,0 +955,0 @@ **Returns** |
@@ -42,2 +42,4 @@ type ColorMode = { | ||
infoFields?: boolean; | ||
infoOutlineColor?: string; | ||
infoOutlineWidth?: number; | ||
infoSize?: number; | ||
@@ -70,14 +72,63 @@ installationComposition?: string; | ||
type BaseAffiliation = "" | "Hostile" | "Friend" | "Neutral" | "Unknown"; | ||
type Affiliation = "undefined" | BaseAffiliation; | ||
type Context = "Reality" | "Exercise" | "Simulation"; | ||
// Dimension it belongs to (Air/Ground...) | ||
type BaseDimension = "" | "Air" | "Ground" | "Sea" | "Subsurface"; | ||
// Dimension it is shown as (Air/Ground...) for example Ground Equipment is shown with the same shape as Sea. | ||
type Dimension = "undefined" | "LandDismountedIndividual" | BaseDimension; | ||
// What condition is it in | ||
type Condition = "" | "Present" | "Planned" | "FullyCapable" | "Damaged" | "Destroyed" | "FullToCapacity"; | ||
type Echelon = | ||
"" | ||
| "Team/Crew" | ||
| "Squad" | ||
| "Section" | ||
| "Platoon/detachment" | ||
| "Company/battery/troop" | ||
| "Battalion/squadron" | ||
| "Regiment/group" | ||
| "Brigade" | ||
| "Division" | ||
| "Corps/MEF" | ||
| "Army" | ||
| "Army Group/front" | ||
| "Region/Theater" | ||
| "Command"; | ||
type Mobility = | ||
"" | ||
| "Wheeled limited cross country" | ||
| "Wheeled cross country" | ||
| "Tracked" | ||
| "Wheeled and tracked combination" | ||
| "Towed" | ||
| "Rail" | ||
| "Pack animals" | ||
| "Over snow (prime mover)" | ||
| "Sled" | ||
| "Barge" | ||
| "Amphibious" | ||
| "Short towed array" | ||
| "Long towed Array"; | ||
type Leadership = "Leader Individual" | "Deputy Individual"; | ||
type SymbolMetadata = { | ||
activity: boolean; // Is it an Activity | ||
affiliation: string; // Affiliation it is shown as (Friend/Hostile...) | ||
baseAffilation: string; // Affiliation it belongs to (Friend/Hostile...) | ||
baseDimension: string; // Dimension it belongs to (Air/Ground...) | ||
affiliation: Affiliation; // Affiliation it is shown as (Friend/Hostile...) | ||
baseAffilation: BaseAffiliation; // Affiliation it belongs to (Friend/Hostile...) | ||
baseDimension: BaseDimension; // Dimension it belongs to (Air/Ground...) | ||
baseGeometry: Object; // Geometry is a combination of dimension and affiliation (AirFriend/GroundHostile...) | ||
civilian: boolean; // Is it Civilian | ||
condition: string; // What condition is it in | ||
context: string; // Context of the symbol (Reality/Exercise...) | ||
dimension: string; // Dimension it is shown as (Air/Ground...) for example Ground Equipment is shown with the same shape as Sea. | ||
condition: Condition; // What condition is it in | ||
context: Context; // Context of the symbol (Reality/Exercise...) | ||
dimension: Dimension; // Dimension it is shown as (Air/Ground...) for example Ground Equipment is shown with the same shape as Sea. | ||
dimensionUnknown: boolean; // Is the dimension unknown | ||
echelon: string; //What echelon (Platoon/Company...) | ||
dismounted?: boolean; // Land Dismounted Individual should have special icons | ||
echelon: Echelon; //What echelon (Platoon/Company...) | ||
faker: boolean; // Is it a Faker | ||
@@ -91,3 +142,4 @@ fenintDummy: boolean; // Is it a feint/dummy | ||
joker: boolean; // Is it a Joker | ||
mobility: string; // What mobility (Tracked/Sled...) | ||
leadership?: Leadership; | ||
mobility?: Mobility; // What mobility (Tracked/Sled...) | ||
notpresent: string; // Is it Anticipated or Pending | ||
@@ -97,12 +149,13 @@ numberSIDC: boolean; // Is the SIDC number based | ||
taskForce: boolean; // Is it a task force | ||
unit: boolean; // Is this equipment or not | ||
}; | ||
type SymbolColors = { | ||
black: string; // Black parts of the symbol. | ||
fillColor: string; // Symbol fill color. | ||
frameColor: string; // Symbol frame color. | ||
iconColor: string; // Icon color. | ||
iconFillColor: string; // Icon fill color. | ||
none: string; // Transparent parts of the symbol. | ||
white: string; // White parts of the symbol. | ||
black: ColorMode; // Black parts of the symbol. | ||
fillColor: ColorMode; // Symbol fill color. | ||
frameColor: ColorMode; // Symbol frame color. | ||
iconColor: ColorMode; // Icon color. | ||
iconFillColor: ColorMode; // Icon fill color. | ||
none: ColorMode; // Transparent parts of the symbol. | ||
white: ColorMode; // White parts of the symbol. | ||
}; | ||
@@ -113,4 +166,3 @@ | ||
code: string | SymbolOptions, | ||
opts?: SymbolOptions, | ||
style?: SymbolOptions | ||
...options: SymbolOptions[] | ||
); | ||
@@ -117,0 +169,0 @@ |
{ | ||
"name": "milsymbol", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Milsymbol.js is a small library in pure javascript that creates symbols according to MIL-STD-2525 and APP6.", | ||
"main": "dist/milsymbol.js", | ||
"exports": "./index.js", | ||
"types": "index.d.ts", | ||
"directories": { | ||
@@ -32,17 +34,16 @@ "doc": "docs", | ||
"devDependencies": { | ||
"eslint": "^5.7.0", | ||
"eslint-plugin-prettier": "^3.0.0", | ||
"eslint": "^5.16.0", | ||
"eslint-plugin-prettier": "^3.4.1", | ||
"mil-std-2525": "^0.2.5", | ||
"milstd": "^0.1.6", | ||
"milstd2525": "github:spatialillusions/mil-std-2525", | ||
"prettier": "^1.14.3", | ||
"prettier": "^1.19.1", | ||
"rollup": "^0.58.2", | ||
"rollup-plugin-copy": "^0.2.3", | ||
"stanagapp6": "github:spatialillusions/stanag-app6", | ||
"tead": "^0.5.1", | ||
"uglify-js": "^3.4.9" | ||
"stanag-app6": "^0.2.0", | ||
"tead": "^0.5.3", | ||
"uglify-js": "^3.17.4" | ||
}, | ||
"babel": { | ||
"presets": "env" | ||
}, | ||
"dependencies": {} | ||
} | ||
} |
@@ -43,4 +43,4 @@ import copy from "rollup-plugin-copy"; | ||
copy({ | ||
"node_modules/milstd2525/milstd2525.js": "docs/milstd-2525.js", | ||
"node_modules/stanagapp6/stanagapp6.js": "docs/stanag-app6.js", | ||
"node_modules/mil-std-2525/milstd2525.js": "docs/milstd-2525.js", | ||
"node_modules/stanag-app6/stanagapp6.js": "docs/stanag-app6.js", | ||
verbose: true | ||
@@ -47,0 +47,0 @@ }) |
@@ -17,3 +17,3 @@ import { defaultProperties } from "./iconparts-functions.js"; | ||
metadata | ||
propterties object | ||
properties object | ||
@@ -20,0 +20,0 @@ colors |
@@ -21,3 +21,3 @@ import { | ||
metadata | ||
propterties object | ||
properties object | ||
@@ -24,0 +24,0 @@ colors |
@@ -21,3 +21,3 @@ import { | ||
metadata | ||
propterties object | ||
properties object | ||
@@ -24,0 +24,0 @@ colors |
@@ -21,3 +21,3 @@ import { | ||
metadata | ||
propterties object | ||
properties object | ||
@@ -24,0 +24,0 @@ colors |
@@ -21,3 +21,3 @@ import { | ||
metadata | ||
propterties object | ||
properties object | ||
@@ -24,0 +24,0 @@ colors |
@@ -21,3 +21,3 @@ import { | ||
metadata | ||
propterties object | ||
properties object | ||
@@ -306,4 +306,4 @@ colors | ||
: (STD2525 || numberSIDC) && !monoColor | ||
? colors.iconColor.Hostile | ||
: iconFillColor, | ||
? colors.iconColor.Hostile | ||
: iconFillColor, | ||
stroke: (STD2525 || numberSIDC) && !monoColor ? black : iconColor, | ||
@@ -330,4 +330,4 @@ d: "m 100,128 -10,15 20,0 z" | ||
: (STD2525 || numberSIDC) && !alternateMedal | ||
? black | ||
: white, | ||
? black | ||
: white, | ||
x: 100, | ||
@@ -347,4 +347,4 @@ y: 110, | ||
: (STD2525 || numberSIDC) && !alternateMedal | ||
? black | ||
: white, | ||
? black | ||
: white, | ||
x: 100, | ||
@@ -375,4 +375,4 @@ y: 112, | ||
: (STD2525 || numberSIDC) && !alternateMedal | ||
? black | ||
: white, | ||
? black | ||
: white, | ||
x: 100, | ||
@@ -577,4 +577,4 @@ y: 112, | ||
: (STD2525 || numberSIDC) && !alternateMedal | ||
? black | ||
: white, | ||
? black | ||
: white, | ||
x: 100, | ||
@@ -642,4 +642,4 @@ y: 112, | ||
: (STD2525 || numberSIDC) && !alternateMedal | ||
? black | ||
: white, | ||
? black | ||
: white, | ||
x: 100, | ||
@@ -719,4 +719,4 @@ y: 105, | ||
: (STD2525 || numberSIDC) && !alternateMedal | ||
? black | ||
: white, | ||
? black | ||
: white, | ||
x: 100, | ||
@@ -733,4 +733,4 @@ y: 110, | ||
: (STD2525 || numberSIDC) && !alternateMedal | ||
? black | ||
: white, | ||
? black | ||
: white, | ||
x: 100, | ||
@@ -747,4 +747,4 @@ y: 110, | ||
: (STD2525 || numberSIDC) && !alternateMedal | ||
? black | ||
: white, | ||
? black | ||
: white, | ||
x: 100, | ||
@@ -761,4 +761,4 @@ y: 110, | ||
: (STD2525 || numberSIDC) && !alternateMedal | ||
? black | ||
: white, | ||
? black | ||
: white, | ||
x: 100, | ||
@@ -775,4 +775,4 @@ y: 110, | ||
: (STD2525 || numberSIDC) && !alternateMedal | ||
? black | ||
: white, | ||
? black | ||
: white, | ||
x: 100, | ||
@@ -803,4 +803,4 @@ y: 110, | ||
: (STD2525 || numberSIDC) && !alternateMedal | ||
? black | ||
: white, | ||
? black | ||
: white, | ||
x: 100, | ||
@@ -868,4 +868,4 @@ y: 112, | ||
: (STD2525 || numberSIDC) && !alternateMedal | ||
? black | ||
: white, | ||
? black | ||
: white, | ||
x: 100, | ||
@@ -926,4 +926,4 @@ y: 112, | ||
: (STD2525 || numberSIDC) && !alternateMedal | ||
? black | ||
: white, | ||
? black | ||
: white, | ||
x: 100, | ||
@@ -930,0 +930,0 @@ y: 112, |
@@ -190,6 +190,6 @@ //import { ms } from "../ms.js"; | ||
break; | ||
case "Y": | ||
case "X": | ||
metadata.mobility = mapping.echelonMobility[51]; //Barge | ||
break; | ||
case "Z": | ||
case "Y": | ||
metadata.mobility = mapping.echelonMobility[52]; //Amphibious | ||
@@ -196,0 +196,0 @@ break; |
@@ -1,2 +0,2 @@ | ||
var ms = new function() { | ||
var ms = new (function() { | ||
this._autoValidation = false; | ||
@@ -13,3 +13,3 @@ this.version = "2.0.0"; | ||
} | ||
}(); | ||
})(); | ||
@@ -16,0 +16,0 @@ import ColorModes from "./colormodes.js"; |
@@ -61,2 +61,4 @@ import { BBox } from "./bbox.js"; | ||
this.style.infoFields = true; // If you have set all info fields but don't want the displayed; then just set this to false. | ||
this.style.infoOutlineColor = "rgb(239, 239, 239)"; // Color of the text outline. | ||
this.style.infoOutlineWidth = false; // Width of the text-field outline. | ||
this.style.infoSize = 40; // Relative size of the info fields | ||
@@ -126,5 +128,7 @@ this.style.monoColor = ""; // Should the icon be monocromatic and if so what color | ||
Symbol.prototype.toDataURL = function() { | ||
return "data:image/svg+xml;base64," + window.btoa(this.asSVG()); | ||
return ( | ||
"data:image/svg+xml;base64," + window.btoa(encodeURIComponent(this.asSVG())) | ||
); | ||
}; | ||
export default Symbol; |
@@ -42,3 +42,3 @@ //import { ms } from "../ms.js"; | ||
"54": "Subsurface", | ||
"60": "Ground" | ||
"60": "Air" | ||
}; | ||
@@ -45,0 +45,0 @@ |
@@ -22,9 +22,9 @@ import { metadata as metadata_number } from "../metadata.js"; | ||
sId["110000"] = []; | ||
sId["110100"] = [icn["CY.IC.COMBAT MISSION TEAM"]]; | ||
sId["110200"] = [icn["CY.IC.NATIONAL MISSION TEAM"]]; | ||
sId["110300"] = [icn["CY.IC.CYBER PROTECTION TEAM"]]; | ||
sId["110400"] = [icn["CY.IC.NATION STATE CYBER THREAT ACTOR"]]; | ||
sId["110500"] = [icn["CY.IC.NON NATION STATE CYBER THREAT ACTOR"]]; | ||
/* | ||
//sId['120000'] = 'Infection'; | ||
sId["110100"] = [icn["CY.IC.COMMAND AND CONTROL (C2)"]]; | ||
sId["110200"] = [icn["CY.IC.HERDER"]]; | ||
sId["110300"] = [icn["CY.IC.CALLBACK DOMAIN"]]; | ||
sId["110400"] = [icn["CY.IC.ZOMBIE"]]; | ||
// sId["110500"] = //[icn["CY.IC.NON NATION STATE CYBER THREAT ACTOR"]]; | ||
sId["120000"] = []; //'Infection'; | ||
sId["120100"] = [icn["CY.IC.ADVANCED PERSISTENT THREAT (APT)"]]; | ||
@@ -40,3 +40,4 @@ sId["120101"] = [icn["CY.IC.APT WITH C2"]]; | ||
sId["120204"] = [icn["CY.IC.NAPT OTHER"]]; | ||
//sId['130000'] = 'Health and Status'; | ||
sId["130000"] = []; //'Health and Status'; | ||
sId["130100"] = [icn["CY.IC.NORMAL"]]; | ||
@@ -46,3 +47,4 @@ sId["130200"] = [icn["CY.IC.NETWORK OUTAGE"]]; | ||
sId["130400"] = [icn["CY.IC.IMPAIRED"]]; | ||
//sId['140000'] = 'Device Type'; | ||
sId["140000"] = []; //'Device Type'; | ||
sId["140100"] = [icn["CY.IC.CORE ROUTER"]]; | ||
@@ -60,3 +62,4 @@ sId["140200"] = [icn["CY.IC.ROUTER"]]; | ||
sId["141200"] = [icn["CY.IC.VIRTUAL PRIVATE NETWORK (VPN)"]]; | ||
//sId['150000'] = 'Device Domain'; | ||
sId["150000"] = []; //'Device Domain'; | ||
sId["150100"] = [icn["CY.IC.DEPARTMENT OF DEFENSE (DOD)"]]; | ||
@@ -69,3 +72,4 @@ sId["150200"] = [icn["CY.IC.GOVERNMENT"]]; | ||
sId["150500"] = [icn["CY.IC.NON-GOVERNMENT"]]; | ||
//sId['160000'] = 'Effect'; | ||
sId["160000"] = []; //'Effect'; | ||
sId["160100"] = [icn["CY.IC.INFECTION"]]; | ||
@@ -80,5 +84,4 @@ sId["160200"] = [icn["CY.IC.DEGRADATION"]]; | ||
sId["160900"] = [icn["CY.IC.DEVICE OUTAGE"]]; | ||
*/ | ||
} | ||
} | ||
}; |
@@ -610,3 +610,3 @@ import { ms } from "../../ms.js"; | ||
sId["220200"] = [icn["GR.EQ.SENSOR EMPLACED"]]; | ||
sId["220300"] = [icn["GR.EQ.RADAR"]]; | ||
sId["220300"] = [icn["SI.IC.RADAR"]]; | ||
sId["230000"] = [icn["GR.IC.FF.EMERGENCY OPERATION"]]; | ||
@@ -613,0 +613,0 @@ sId["230100"] = [ |
@@ -494,3 +494,3 @@ import { ms } from "../../ms.js"; | ||
sIdm1["75"] = [icn["GR.M1.MEDEVAC"]]; | ||
sIdm1["76"] = [icn["GR.M1.CYBERSPACE"]]; | ||
sIdm1["76"] = [icn["GR.M1.RANGER"]]; | ||
sIdm1["77"] = [icn["GR.M1.SUPPORT"]]; | ||
@@ -497,0 +497,0 @@ sIdm1["78"] = [icn["GR.M1.AVIATION"]]; |
@@ -153,3 +153,4 @@ //Base Geometry for the Symbol ########################################################### | ||
} | ||
// Space Modifiers | ||
// Cyberspace Modifiers | ||
/* | ||
if (this.metadata.cyberspace) { | ||
@@ -184,2 +185,3 @@ modifier = { | ||
} | ||
*/ | ||
//Add a dashed outline to the frame if the status is not present. | ||
@@ -186,0 +188,0 @@ if ( |
@@ -595,3 +595,3 @@ //Text Fields ############################################################################ | ||
this.metadata.baseGeometry.bbox.width()) / | ||
2 | ||
2 | ||
: 0, | ||
@@ -601,3 +601,3 @@ this.options.quantity | ||
this.metadata.baseGeometry.bbox.width()) / | ||
2 | ||
2 | ||
: 0, | ||
@@ -618,3 +618,3 @@ strWidth(gStrings.L1), | ||
this.metadata.baseGeometry.bbox.width()) / | ||
2 | ||
2 | ||
: 0, | ||
@@ -624,3 +624,3 @@ this.options.quantity | ||
this.metadata.baseGeometry.bbox.width()) / | ||
2 | ||
2 | ||
: 0, | ||
@@ -911,9 +911,16 @@ strWidth(gStrings.R1), | ||
//outline | ||
if (this.style.outlineWidth > 0) | ||
if ( | ||
this.style.infoOutlineWidth > 0 || | ||
(this.style.infoOutlineWidth === false && this.style.outlineWidth > 0) | ||
) | ||
drawArray1.push( | ||
ms.outline( | ||
drawArray2, | ||
this.style.outlineWidth, | ||
this.style.infoOutlineWidth === false | ||
? this.style.outlineWidth | ||
: this.style.infoOutlineWidth, | ||
this.style.strokeWidth, | ||
typeof this.style.outlineColor === "object" | ||
this.style.infoOutlineColor | ||
? this.style.infoOutlineColor | ||
: typeof this.style.outlineColor === "object" | ||
? this.style.outlineColor[this.metadata.affiliation] | ||
@@ -920,0 +927,0 @@ : this.style.outlineColor |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6b } from "stanagapp6"; | ||
import { app6b } from "stanag-app6"; | ||
import verify from "./letter-sidc"; | ||
@@ -6,0 +6,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6b } from "stanagapp6"; | ||
import { app6b } from "stanag-app6"; | ||
import verify from "./letter-sidc"; | ||
@@ -6,0 +6,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6b } from "stanagapp6"; | ||
import { app6b } from "stanag-app6"; | ||
import verify from "./letter-sidc"; | ||
@@ -6,0 +6,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6b } from "stanagapp6"; | ||
import { app6b } from "stanag-app6"; | ||
import verify from "./letter-sidc"; | ||
@@ -6,0 +6,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6b } from "stanagapp6"; | ||
import { app6b } from "stanag-app6"; | ||
import verify from "./letter-sidc"; | ||
@@ -6,0 +6,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6b } from "stanagapp6"; | ||
import { app6b } from "stanag-app6"; | ||
import verify from "./letter-sidc"; | ||
@@ -6,0 +6,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6b } from "stanagapp6"; | ||
import { app6b } from "stanag-app6"; | ||
import verify from "./letter-sidc"; | ||
@@ -6,0 +6,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6b } from "stanagapp6"; | ||
import { app6b } from "stanag-app6"; | ||
import verify from "./letter-sidc"; | ||
@@ -6,0 +6,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6d } from "stanagapp6"; | ||
import { app6d } from "stanag-app6"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6d } from "stanagapp6"; | ||
import { app6d } from "stanag-app6"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6d } from "stanagapp6"; | ||
import { app6d } from "stanag-app6"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6d } from "stanagapp6"; | ||
import { app6d } from "stanag-app6"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6d } from "stanagapp6"; | ||
import { app6d } from "stanag-app6"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6d } from "stanagapp6"; | ||
import { app6d } from "stanag-app6"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6d } from "stanagapp6"; | ||
import { app6d } from "stanag-app6"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6d } from "stanagapp6"; | ||
import { app6d } from "stanag-app6"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6d } from "stanagapp6"; | ||
import { app6d } from "stanag-app6"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6d } from "stanagapp6"; | ||
import { app6d } from "stanag-app6"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6d } from "stanagapp6"; | ||
import { app6d } from "stanag-app6"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6d } from "stanagapp6"; | ||
import { app6d } from "stanag-app6"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { app6d } from "stanagapp6"; | ||
import { app6d } from "stanag-app6"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ ms.setStandard("APP6"); |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525c } from "milstd2525"; | ||
import { ms2525c } from "mil-std-2525"; | ||
import verify from "./letter-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525c } from "milstd2525"; | ||
import { ms2525c } from "mil-std-2525"; | ||
import verify from "./letter-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525c } from "milstd2525"; | ||
import { ms2525c } from "mil-std-2525"; | ||
import verify from "./letter-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525c } from "milstd2525"; | ||
import { ms2525c } from "mil-std-2525"; | ||
import verify from "./letter-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525c } from "milstd2525"; | ||
import { ms2525c } from "mil-std-2525"; | ||
import verify from "./letter-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525c } from "milstd2525"; | ||
import { ms2525c } from "mil-std-2525"; | ||
import verify from "./letter-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525c } from "milstd2525"; | ||
import { ms2525c } from "mil-std-2525"; | ||
import verify from "./letter-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525c } from "milstd2525"; | ||
import { ms2525c } from "mil-std-2525"; | ||
import verify from "./letter-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525c } from "milstd2525"; | ||
import { ms2525c } from "mil-std-2525"; | ||
import verify from "./letter-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525c } from "milstd2525"; | ||
import { ms2525c } from "mil-std-2525"; | ||
import verify from "./letter-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525c } from "milstd2525"; | ||
import { ms2525c } from "mil-std-2525"; | ||
import verify from "./letter-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525d } from "milstd2525"; | ||
import { ms2525d } from "mil-std-2525"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525d } from "milstd2525"; | ||
import { ms2525d } from "mil-std-2525"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525d } from "milstd2525"; | ||
import { ms2525d } from "mil-std-2525"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525d } from "milstd2525"; | ||
import { ms2525d } from "mil-std-2525"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525d } from "milstd2525"; | ||
import { ms2525d } from "mil-std-2525"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525d } from "milstd2525"; | ||
import { ms2525d } from "mil-std-2525"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525d } from "milstd2525"; | ||
import { ms2525d } from "mil-std-2525"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525d } from "milstd2525"; | ||
import { ms2525d } from "mil-std-2525"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525d } from "milstd2525"; | ||
import { ms2525d } from "mil-std-2525"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525d } from "milstd2525"; | ||
import { ms2525d } from "mil-std-2525"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525d } from "milstd2525"; | ||
import { ms2525d } from "mil-std-2525"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525d } from "milstd2525"; | ||
import { ms2525d } from "mil-std-2525"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525d } from "milstd2525"; | ||
import { ms2525d } from "mil-std-2525"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525d } from "milstd2525"; | ||
import { ms2525d } from "mil-std-2525"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ |
import { ms } from "../src/milsymbol"; | ||
ms.reset(); | ||
import { ms2525d } from "milstd2525"; | ||
import { ms2525d } from "mil-std-2525"; | ||
import verify from "./number-sidc"; | ||
@@ -5,0 +5,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6975768
197
61537