@sumaris-net/ngx-components 1.6.17 → 1.6.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/sumaris-net.ngx-components.umd.js +19 -18
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/shared/material/latlong/material.latlong.js +20 -19
- package/fesm2015/sumaris-net.ngx-components.js +19 -18
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
|
@@ -4720,24 +4720,25 @@
|
|
|
4720
4720
|
this.pattern = 'DDMM';
|
|
4721
4721
|
this.mask = MASKS[this.type][this.pattern];
|
|
4722
4722
|
}
|
|
4723
|
-
if (this.maxDecimals) {
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4723
|
+
if (isNil(this.maxDecimals)) {
|
|
4724
|
+
this.maxDecimals = DEFAULT_MAX_DECIMALS;
|
|
4725
|
+
}
|
|
4726
|
+
// Remove max decimals in the DDMMSS format
|
|
4727
|
+
else if (this.pattern === 'DD') {
|
|
4728
|
+
console.warn("Invalid attribute 'maxDecimals' - Must be '0' when using the 'DDMMSS' pattern.");
|
|
4729
|
+
this.maxDecimals = 7;
|
|
4730
|
+
}
|
|
4731
|
+
else if (this.pattern === 'DDMMSS') {
|
|
4732
|
+
console.warn("Invalid attribute 'maxDecimals' - Must be '0' when using the 'DDMMSS' pattern.");
|
|
4733
|
+
this.maxDecimals = 0;
|
|
4734
|
+
}
|
|
4735
|
+
else if (this.maxDecimals < 0) {
|
|
4736
|
+
console.error('Invalid attribute \'maxDecimals\'. Must a positive value.');
|
|
4737
|
+
this.maxDecimals = DEFAULT_MAX_DECIMALS;
|
|
4738
|
+
}
|
|
4739
|
+
else if (this.maxDecimals !== DEFAULT_MAX_DECIMALS) {
|
|
4740
|
+
console.warn("Invalid attribute 'maxDecimals' - Expected value: " + DEFAULT_MAX_DECIMALS + ". Other value not implemented.");
|
|
4741
|
+
this.maxDecimals = DEFAULT_MAX_DECIMALS;
|
|
4741
4742
|
}
|
|
4742
4743
|
this.showSignControl = this.pattern !== 'DD';
|
|
4743
4744
|
this.formatFn = this.type === 'latitude' ? formatLatitude : formatLongitude;
|